From 696df83b69b5cc995d4819f6d00aa7e65cf65997 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Mon, 4 May 2026 19:22:35 +0800 Subject: 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. --- elisp.el | 16 ++++++++++------ 1 file 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 -- cgit v1.2.3-18-g5258