From 1a22bc0fd672e2c71955faf81ff2cfd1c0c76be9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 24 Feb 2025 23:02:20 +0100 Subject: 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. --- lisp/emacs-lisp/subr-x.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/subr-x.el') diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index 27e039eff9b..4ce7bd00f31 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -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))) -- cgit v1.2.3