diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2017-11-27 15:33:30 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2017-11-27 15:33:30 -0500 |
commit | 91a7f934ac826c0844509099727d3945655d43ca (patch) | |
tree | 0f7554a3365456ea63009e57ae78ae8bc45c3267 /test/lisp/emacs-lisp/cl-lib-tests.el | |
parent | cea0bca54f1fa3635591e24eba1017742b04abd0 (diff) | |
download | emacs-91a7f934ac826c0844509099727d3945655d43ca.tar.gz emacs-91a7f934ac826c0844509099727d3945655d43ca.tar.bz2 emacs-91a7f934ac826c0844509099727d3945655d43ca.zip |
* lisp/emacs-lisp/cl-macs.el: Fix bug#26073.
* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand):
Implement Common-Lisp's behavior for symbol-macro's let-rebindings.
(cl--letf, cl-letf): Don't get fooled into using a plain `let` for
symbol-macros.
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide):
New test.
Diffstat (limited to 'test/lisp/emacs-lisp/cl-lib-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/cl-lib-tests.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el b/test/lisp/emacs-lisp/cl-lib-tests.el index ed85f5a0f66..692dd0f72cf 100644 --- a/test/lisp/emacs-lisp/cl-lib-tests.el +++ b/test/lisp/emacs-lisp/cl-lib-tests.el @@ -516,6 +516,16 @@ (ert-deftest cl-lib-symbol-macrolet-2 () (should (equal (cl-lib-symbol-macrolet-4+5) (+ 4 5)))) + +(ert-deftest cl-lib-symbol-macrolet-hide () + ;; bug#26325 + (should (equal (let ((y 5)) + (cl-symbol-macrolet ((x y)) + (list x + (let ((x 6)) (list x y)) + (cl-letf ((x 6)) (list x y))))) + '(5 (6 5) (6 6))))) + (defun cl-lib-tests--dummy-function () ;; Dummy function to see if the file is compiled. t) |