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.
This commit is contained in:
Stefan Monnier 2022-09-03 22:38:28 -04:00
parent 1d1158397b
commit 2dd1c2ab19
3 changed files with 20 additions and 3 deletions

View file

@ -2762,7 +2762,7 @@ Each PLACE may be a symbol, or any generalized variable allowed by `setf'.
(funcall setter vold)))
binds))))
(let* ((binding (car bindings))
(place (macroexpand (car binding) macroexpand-all-environment)))
(place (car binding)))
(gv-letplace (getter setter) place
(macroexp-let2 nil vnew (cadr binding)
(if (symbolp place)