summaryrefslogtreecommitdiff
path: root/elisp.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2026-05-04 19:22:35 +0800
committerJSDurand <mmemmew@gmail.com>2026-05-04 19:22:35 +0800
commit696df83b69b5cc995d4819f6d00aa7e65cf65997 (patch)
treeb6cd9a7d47fdccfd1410fc774b90b2dd97919399 /elisp.el
parenta652f62082f13fa19d98d71394b6f8a2eba7e6df (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.
Diffstat (limited to 'elisp.el')
-rw-r--r--elisp.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/elisp.el b/elisp.el
index 415ce59..b2da685 100644
--- a/elisp.el
+++ b/elisp.el
@@ -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