diff options
| author | JSDurand <mmemmew@gmail.com> | 2026-05-04 19:22:35 +0800 |
|---|---|---|
| committer | JSDurand <mmemmew@gmail.com> | 2026-05-04 19:22:35 +0800 |
| commit | 696df83b69b5cc995d4819f6d00aa7e65cf65997 (patch) | |
| tree | b6cd9a7d47fdccfd1410fc774b90b2dd97919399 | |
| parent | a652f62082f13fa19d98d71394b6f8a2eba7e6df (diff) | |
elisp: Fix obsolete when-let form
That code was copied from elsewhere and used the to-be-obsolete form
when-let. This is now fixed to use plain let binding and cond forms.
| -rw-r--r-- | elisp.el | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -214,17 +214,21 @@ PARSE-START is the starting position of the parse." (any-quoted-p nil) (point nil)) (or - (when-let (char (char-before last)) - (or (char-equal char ?') - (char-equal char ?`))) + (let ((char (char-before point))) + (cond + (char + (or (char-equal char ?') + (char-equal char ?`))))) (progn (while (and rest (not any-quoted-p)) (setq point (pop rest)) (setq any-quoted-p (or - (when-let (char (char-before point)) - (or (char-equal char ?') - (char-equal char ?`))) + (let ((char (char-before point))) + (cond + (char + (or (char-equal char ?') + (char-equal char ?`))))) (save-excursion (goto-char (1+ point)) (looking-at-p |
