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 /test/lisp/emacs-lisp/let-alist-tests.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 'test/lisp/emacs-lisp/let-alist-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/let-alist-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/let-alist-tests.el b/test/lisp/emacs-lisp/let-alist-tests.el index 80d418cabbe..657a27a67dc 100644 --- a/test/lisp/emacs-lisp/let-alist-tests.el +++ b/test/lisp/emacs-lisp/let-alist-tests.el @@ -88,4 +88,12 @@ '(cdr (assq 'baz (cdr (assq 'bar (cdr (assq 'foo var)))))))) (should (equal (let-alist--access-sexp '..foo.bar.baz 'var) '.foo.bar.baz))) +(ert-deftest let-alist--deep-dot-search--nested () + "Check that nested `let-alist' forms don't generate spurious bindings. +See Bug#24641." + (should (equal (let-alist--deep-dot-search '(foo .bar (baz .qux))) + '((.bar . bar) (.qux . qux)))) + (should (equal (let-alist--deep-dot-search '(foo .bar (let-alist .qux .baz))) + '((.bar . bar) (.qux . qux))))) ; no .baz + ;;; let-alist.el ends here |