diff options
| author | Mark Oteiza | 2017-09-18 09:00:45 -0400 |
|---|---|---|
| committer | Mark Oteiza | 2017-09-18 09:00:45 -0400 |
| commit | 331d0e520ff5a3599cc9958108a6b6b8cb277ce3 (patch) | |
| tree | cdb5a3789c3959eb66103b76e12e5446fce52eeb /lisp | |
| parent | 466df76f7df06a03760545fe03d71bc0dc7fe98f (diff) | |
| download | emacs-331d0e520ff5a3599cc9958108a6b6b8cb277ce3.tar.gz emacs-331d0e520ff5a3599cc9958108a6b6b8cb277ce3.zip | |
Fix gensym
* lisp/subr.el (gensym): Actually implement the default prefix.
* test/lisp/subr-tests.el (subr-tests--gensym): New test.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/subr.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 79ae1f4830d..96b1ac19b4b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -289,7 +289,7 @@ The name is made by appending `gensym-counter' to PREFIX. | |||
| 289 | PREFIX is a string, and defaults to \"g\"." | 289 | PREFIX is a string, and defaults to \"g\"." |
| 290 | (let ((num (prog1 gensym-counter | 290 | (let ((num (prog1 gensym-counter |
| 291 | (setq gensym-counter (1+ gensym-counter))))) | 291 | (setq gensym-counter (1+ gensym-counter))))) |
| 292 | (make-symbol (format "%s%d" prefix num)))) | 292 | (make-symbol (format "%s%d" (or prefix "g") num)))) |
| 293 | 293 | ||
| 294 | (defun ignore (&rest _ignore) | 294 | (defun ignore (&rest _ignore) |
| 295 | "Do nothing and return nil. | 295 | "Do nothing and return nil. |