aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Monnier2022-09-03 22:38:28 -0400
committerStefan Monnier2022-09-03 22:38:28 -0400
commit2dd1c2ab19f7fb99ecee60e27e63b2fb045f6970 (patch)
tree07ef5fd76165ec05f4ec43c2a99fec424476779c /test
parent1d1158397bce41466078e384eed2d1e214e206de (diff)
downloademacs-2dd1c2ab19f7fb99ecee60e27e63b2fb045f6970.tar.gz
emacs-2dd1c2ab19f7fb99ecee60e27e63b2fb045f6970.zip
gv.el and cl-macs.el: Fix bug#57397
* lisp/emacs-lisp/gv.el (gv-get): Obey symbol macros. * lisp/emacs-lisp/cl-macs.el (cl--letf): Remove workaround placed to try and handle symbol macros. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet): Add new testcase.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/emacs-lisp/cl-macs-tests.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/cl-macs-tests.el b/test/lisp/emacs-lisp/cl-macs-tests.el
index 19ede627a13..2a647e08305 100644
--- a/test/lisp/emacs-lisp/cl-macs-tests.el
+++ b/test/lisp/emacs-lisp/cl-macs-tests.el
@@ -539,7 +539,20 @@ collection clause."
539 ((p (gv-synthetic-place cl (lambda (v) `(setcar l ,v))))) 539 ((p (gv-synthetic-place cl (lambda (v) `(setcar l ,v)))))
540 (cl-incf p))) 540 (cl-incf p)))
541 l) 541 l)
542 '(1)))) 542 '(1)))
543 ;; Make sure `gv-synthetic-place' isn't macro-expanded before
544 ;; `cl-letf' gets to see its `gv-expander'.
545 (should (equal
546 (condition-case err
547 (let ((x 1))
548 (list x
549 (cl-letf (((gv-synthetic-place (+ 1 2)
550 (lambda (v) `(setq x ,v)))
551 7))
552 x)
553 x))
554 (error err))
555 '(1 7 3))))
543 556
544(ert-deftest cl-macs-loop-conditional-step-clauses () 557(ert-deftest cl-macs-loop-conditional-step-clauses ()
545 "These tests failed under the initial fixes in #bug#29799." 558 "These tests failed under the initial fixes in #bug#29799."