diff options
author | Philipp Stephani <phst@google.com> | 2016-10-08 15:29:32 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2016-10-08 18:36:54 +0200 |
commit | 5b774598f4911975444120f56e448c4ca5f8c11f (patch) | |
tree | 62f84488e935080f80b499d5674c12ab4a57e251 /lisp/emacs-lisp/let-alist.el | |
parent | f3eedc7e68d0e8b97425b72d691593d06639df88 (diff) | |
download | emacs-5b774598f4911975444120f56e448c4ca5f8c11f.tar.gz emacs-5b774598f4911975444120f56e448c4ca5f8c11f.tar.bz2 emacs-5b774598f4911975444120f56e448c4ca5f8c11f.zip |
Don’t consider nested let-alist forms
See Bug#24641.
* lisp/emacs-lisp/let-alist.el (let-alist--deep-dot-search): Don’t
consider symbols in nested ‘let-alist’ forms.
* test/lisp/emacs-lisp/let-alist-tests.el
(let-alist--deep-dot-search--nested): Add a unit test.
Diffstat (limited to 'lisp/emacs-lisp/let-alist.el')
-rw-r--r-- | lisp/emacs-lisp/let-alist.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/let-alist.el b/lisp/emacs-lisp/let-alist.el index 3507a395436..d7069174c1b 100644 --- a/lisp/emacs-lisp/let-alist.el +++ b/lisp/emacs-lisp/let-alist.el @@ -76,6 +76,11 @@ symbol, and each cdr is the same symbol without the `.'." ;; with other results in the clause below. (list (cons data (intern (replace-match "" nil nil name))))))) ((not (consp data)) nil) + ((eq (car data) 'let-alist) + ;; For nested ‘let-alist’ forms, ignore symbols appearing in the + ;; inner body because they don’t refer to the alist currently + ;; being processed. See Bug#24641. + (let-alist--deep-dot-search (cadr data))) (t (append (let-alist--deep-dot-search (car data)) (let-alist--deep-dot-search (cdr data)))))) |