From 10920f111ed20748c382e8bb17e8bd5fb2721bc9 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sun, 26 Jan 2025 08:55:39 +0100 Subject: [PATCH] Handle `let-alist' double-dot escape --- lisp/emacs-lisp/scope.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/scope.el b/lisp/emacs-lisp/scope.el index 142f9da6f6f..2615661879b 100644 --- a/lisp/emacs-lisp/scope.el +++ b/lisp/emacs-lisp/scope.el @@ -62,9 +62,14 @@ Optional argument LOCAL is a local context to extend." (cond ((keywordp bare) (scope-report 'constant beg len)) ((and scope-current-let-alist-form (= (aref name 0) ?.)) - (scope-report 'variable beg len - (list 'let-alist (car scope-current-let-alist-form) bare) - (cdr scope-current-let-alist-form))) + (if (and (length> name 1) (= (aref name 1) ?.)) + ;; Double dot espaces `let-alist'. + (let* ((unescaped (intern (substring name 1))) + (id (alist-get unescaped local))) + (scope-report 'variable beg len id)) + (scope-report 'variable beg len + (list 'let-alist (car scope-current-let-alist-form) bare) + (cdr scope-current-let-alist-form)))) (t (let ((id (alist-get bare local))) (scope-report 'variable beg len id))))))) -- 2.39.5