diff options
| author | Mark Oteiza | 2017-09-12 11:08:00 -0400 |
|---|---|---|
| committer | Mark Oteiza | 2017-09-12 11:08:00 -0400 |
| commit | 35c893ddaf21b93677850a69709b59630bb0feb7 (patch) | |
| tree | 4b4a6f9755609940a542acbe639aefa295beb8d9 /doc | |
| parent | 2ae46b4c0dabfea80883a294dff16e0eb7182d30 (diff) | |
| download | emacs-35c893ddaf21b93677850a69709b59630bb0feb7.tar.gz emacs-35c893ddaf21b93677850a69709b59630bb0feb7.zip | |
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 'doc')
| -rw-r--r-- | doc/lispref/symbols.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index e6ea8a1cc09..2d9ec6fda30 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi | |||
| @@ -273,6 +273,13 @@ distinct uninterned symbol whose name is also @samp{foo}. | |||
| 273 | @end example | 273 | @end example |
| 274 | @end defun | 274 | @end defun |
| 275 | 275 | ||
| 276 | @defun gensym &optional prefix | ||
| 277 | This function returns a symbol using @code{make-symbol}, whose name is | ||
| 278 | made by appending @code{gensym-counter} to @var{prefix}. The prefix | ||
| 279 | defaults to @code{"G"}. If @var{prefix} is a number, it replaces the | ||
| 280 | value of the counter. | ||
| 281 | @end defun | ||
| 282 | |||
| 276 | @defun intern name &optional obarray | 283 | @defun intern name &optional obarray |
| 277 | This function returns the interned symbol whose name is @var{name}. If | 284 | This function returns the interned symbol whose name is @var{name}. If |
| 278 | there is no such symbol in the obarray @var{obarray}, @code{intern} | 285 | there is no such symbol in the obarray @var{obarray}, @code{intern} |