diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-28 23:28:18 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-28 23:28:24 +0200 |
commit | d7665ae8df47b24d297ed131eb42ebed446423a0 (patch) | |
tree | 0c8a9fbfdb2f2f0f5fc5e8b778c83b4e98013c38 /test/lisp/emacs-lisp/let-alist-tests.el | |
parent | 776872766cd3af5ef68785236dcc05b378e8f267 (diff) | |
download | emacs-d7665ae8df47b24d297ed131eb42ebed446423a0.tar.gz emacs-d7665ae8df47b24d297ed131eb42ebed446423a0.tar.bz2 emacs-d7665ae8df47b24d297ed131eb42ebed446423a0.zip |
Make let-alist work with vectors
* lisp/emacs-lisp/let-alist.el (let-alist--deep-dot-search):
Descend into vectors, too, looking for dotted variables (bug#23244).
Test case:
(let-alist '((a . 1) (b . 2))
`[,(+ .a) ,(+ .a .b .b)])
Diffstat (limited to 'test/lisp/emacs-lisp/let-alist-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/let-alist-tests.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/let-alist-tests.el b/test/lisp/emacs-lisp/let-alist-tests.el index 31db4a91dcc..9c3f2a5928f 100644 --- a/test/lisp/emacs-lisp/let-alist-tests.el +++ b/test/lisp/emacs-lisp/let-alist-tests.el @@ -95,4 +95,9 @@ See Bug#24641." (should (equal (let-alist--deep-dot-search '(foo .bar (let-alist .qux .baz))) '((.bar . bar) (.qux . qux))))) ; no .baz +(ert-deftest let-alist--vectors () + (should (equal (let-alist '((a . 1) (b . 2)) + `[,(+ .a) ,(+ .a .b .b)]) + [1 5]))) + ;;; let-alist.el ends here |