From 2ae46b4c0dabfea80883a294dff16e0eb7182d30 Mon Sep 17 00:00:00 2001 From: Mark Oteiza Date: Tue, 12 Sep 2017 11:00:58 -0400 Subject: [PATCH] Fix cl-gentemp * lisp/emacs-lisp/cl-macs.el (cl--gentemp-counter): New variable. (cl-gentemp): Use it. Change prefix to "T". --- lisp/emacs-lisp/cl-macs.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 20a956b474a..3405c92e8d4 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -172,14 +172,15 @@ The name is made by appending a number to PREFIX, default \"G\"." (setq cl--gensym-counter (1+ cl--gensym-counter)))))) (make-symbol (format "%s%d" pfix num)))) +(defvar cl--gentemp-counter 0) ;;;###autoload (defun cl-gentemp (&optional prefix) "Generate a new interned symbol with a unique name. -The name is made by appending a number to PREFIX, default \"G\"." - (let ((pfix (if (stringp prefix) prefix "G")) +The name is made by appending a number to PREFIX, default \"T\"." + (let ((pfix (if (stringp prefix) prefix "T")) name) - (while (intern-soft (setq name (format "%s%d" pfix cl--gensym-counter))) - (setq cl--gensym-counter (1+ cl--gensym-counter))) + (while (intern-soft (setq name (format "%s%d" pfix cl--gentemp-counter))) + (setq cl--gentemp-counter (1+ cl--gentemp-counter))) (intern name))) -- 2.39.2