]> git.eshelyaron.com Git - emacs.git/commit
Make cl-gensym obsolete in favor of built-in gensym
authorStefan Kangas <stefankangas@gmail.com>
Mon, 24 Feb 2025 23:12:00 +0000 (00:12 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 26 Feb 2025 09:37:42 +0000 (10:37 +0100)
commit8a8016b1dccfbbe1e9c36a865dae37395febfbe6
tree06c31e64510d1764d1ac5ef245232eaa63702a88
parent3c3b50063d784b5efd07a4740e43276dff00b380
Make cl-gensym obsolete in favor of built-in gensym

* lisp/emacs-lisp/cl-macs.el (cl-gensym): Declare function
obsolete in favor of gensym, added in Emacs 26.1.  The only reason
for its existence is that it allows an integer argument, but
that's not really useful, so it's better to remove this complexity.
Ref: https://lists.gnu.org/r/emacs-devel/2017-09/msg00313.html
* doc/misc/cl.texi (Symbols, Creating Symbols, Efficiency Concerns)
(Obsolete Setf Customization): Don't document above obsolete function.
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause):
* lisp/emacs-lisp/edebug.el (edebug-make-form-wrapper):
* lisp/obsolete/cl.el (cl--function-convert, lexical-let):
* lisp/obsolete/thumbs.el (thumbs-temp-file):
* lisp/progmodes/eglot.el (eglot--lambda)
(eglot--when-live-buffer, eglot--when-buffer-window)
(eglot--collecting-xrefs, eglot--glob-parse):
* lisp/progmodes/flymake.el (flymake--run-backend):
* test/lisp/emacs-lisp/package-tests.el (with-package-test):
* test/lisp/progmodes/eglot-tests.el (eglot--guessing-contact):
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-shorthand-read-buffer, elisp-shorthand-read-from-string): Prefer
plain gensym to cl-gensym in files that can depend on Emacs 26.1.
* lisp/jsonrpc.el (jsonrpc-lambda, jsonrpc-request): Prefer gensym to
cl-gensym only when defined, as this file supports Emacs 25.1
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-lib-test-gensym): Simplify
test as 'should' no longer uses cl-gensym.

(cherry picked from commit 60b071e224136207f7fa24983037522e637e7efa)
doc/misc/cl.texi
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/edebug.el
lisp/jsonrpc.el
lisp/obsolete/cl.el
lisp/obsolete/thumbs.el
lisp/progmodes/eglot.el
lisp/progmodes/flymake.el
test/lisp/emacs-lisp/cl-macs-tests.el
test/lisp/progmodes/eglot-tests.el
test/lisp/progmodes/elisp-mode-tests.el