1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 14:30:50 -08:00

Use cl-with-gensyms in a few more cases

* doc/misc/cl.texi (Macro Bindings):
* lisp/emacs-lisp/comp.el (comp--with-sp):
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
* lisp/eshell/em-extpipe.el (eshell-extpipe--or-with-catch):
* lisp/international/mule-cmds.el (with-locale-environment):
* lisp/kmacro.el (kmacro-menu--marks-exist-p):
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-lib-test-remprop):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-deduplicate):
* test/lisp/emacs-lisp/ert-tests.el (ert-test-special-operator-p):
* test/lisp/kmacro-tests.el (kmacro-tests-should-insert)
(kmacro-tests-should-match-message):
* test/lisp/replace-tests.el (replace-tests-with-undo): Use
cl-with-gensyms instead of bare gensym call.
This commit is contained in:
Stefan Kangas 2025-02-24 23:02:20 +01:00
parent 7bb53815d2
commit 1a22bc0fd6
11 changed files with 13 additions and 16 deletions

View file

@ -953,7 +953,7 @@ Points to the next slot to be filled.")
Restore the original value afterwards."
(declare (debug (form body))
(indent defun))
(let ((sym (gensym)))
(cl-with-gensyms (sym)
`(let ((,sym (comp--sp)))
(setf (comp--sp) ,sp)
(progn ,@body)

View file

@ -551,8 +551,7 @@ as changes in text properties, `buffer-file-coding-system', buffer
multibyteness, etc. -- will not be noticed, and the buffer will still
be marked unmodified, effectively ignoring those changes."
(declare (debug t) (indent 0))
(let ((hash (gensym))
(buffer (gensym)))
(cl-with-gensyms (hash buffer)
`(let ((,hash (and (not (buffer-modified-p))
(buffer-hash)))
(,buffer (current-buffer)))