summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/pcase.el
diff options
context:
space:
mode:
authorMark Oteiza <mvoteiza@udel.edu>2017-09-12 11:08:00 -0400
committerMark Oteiza <mvoteiza@udel.edu>2017-09-12 11:08:00 -0400
commit35c893ddaf21b93677850a69709b59630bb0feb7 (patch)
tree4b4a6f9755609940a542acbe639aefa295beb8d9 /lisp/emacs-lisp/pcase.el
parent2ae46b4c0dabfea80883a294dff16e0eb7182d30 (diff)
downloademacs-35c893ddaf21b93677850a69709b59630bb0feb7.tar.gz
Move gensym to core Elisp
* doc/lispref/symbols.texi (Creating Symbols): Mention gensym right after make-symbol. * etc/NEWS: Mention. * lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Alias to gensym-counter. (cl-gensym): Alias to gensym. * lisp/emacs-lisp/cl.el: Remove gensym from list of aliases. * lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): * lisp/emacs-lisp/ert-x.el (ert-with-message-capture): (ert--expand-should-1, ert--expand-should): (ert--should-error-handle-error): * lisp/emacs-lisp/generator.el (cps--gensym): * lisp/emacs-lisp/gv.el (setf): * lisp/emacs-lisp/inline.el (inline--do-letlisteval): * lisp/emacs-lisp/pcase.el (pcase--make-docstring, pcase-dolist): (pcase--funcall, pcase--u1): Use gensym. * lisp/subr.el (gensym-counter): New variable. (gensym): New function, assimilated from cl-lib.
Diffstat (limited to 'lisp/emacs-lisp/pcase.el')
-rw-r--r--lisp/emacs-lisp/pcase.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 253b60e7534..5935845743d 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -213,7 +213,7 @@ Emacs Lisp manual for more information and examples."
(defmacro pcase-exhaustive (exp &rest cases)
"The exhaustive version of `pcase' (which see)."
(declare (indent 1) (debug pcase))
- (let* ((x (make-symbol "x"))
+ (let* ((x (gensym "x"))
(pcase--dontwarn-upats (cons x pcase--dontwarn-upats)))
(pcase--expand
;; FIXME: Could we add the FILE:LINE data in the error message?
@@ -304,7 +304,7 @@ any kind of error."
(declare (indent 1) (debug ((pcase-PAT form) body)))
(if (pcase--trivial-upat-p (car spec))
`(dolist ,spec ,@body)
- (let ((tmpvar (make-symbol "x")))
+ (let ((tmpvar (gensym "x")))
`(dolist (,tmpvar ,@(cdr spec))
(pcase-let* ((,(car spec) ,tmpvar))
,@body)))))
@@ -715,7 +715,7 @@ MATCH is the pattern that needs to be matched, of the form:
(call (progn
(when (memq arg vs)
;; `arg' is shadowed by `env'.
- (let ((newsym (make-symbol "x")))
+ (let ((newsym (gensym "x")))
(push (list newsym arg) env)
(setq arg newsym)))
(if (functionp fun)
@@ -842,7 +842,7 @@ Otherwise, it defers to REST which is a list of branches of the form
;; A upat of the form (app FUN PAT)
(pcase--mark-used sym)
(let* ((fun (nth 1 upat))
- (nsym (make-symbol "x"))
+ (nsym (gensym "x"))
(body
;; We don't change `matches' to reuse the newly computed value,
;; because we assume there shouldn't be such redundancy in there.