aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc/cl.texi
diff options
context:
space:
mode:
authorPaul Eggert2015-06-27 10:57:02 -0700
committerPaul Eggert2015-06-27 10:59:08 -0700
commitefc262f5f8a16d25c0db4e80fa52e693897fa41f (patch)
tree6a78ad9a601676202619bbf50eccff61f2936e83 /doc/misc/cl.texi
parent5e3fde03b45877d3e30f859a14c10043e637aa63 (diff)
downloademacs-efc262f5f8a16d25c0db4e80fa52e693897fa41f.tar.gz
emacs-efc262f5f8a16d25c0db4e80fa52e693897fa41f.zip
Initialize cl--gensym-counter to 0
Previously it was initialized to a random value, which made it harder to reproduce earlier Emacs runs. The need for a random value went away when Emacs introduced and used the #: syntax for uninterned symbols (Bug#20862). * doc/misc/cl.texi (Creating Symbols, Common Lisp Compatibility): Document that cl--gensym-counter now starts with 0. * lisp/emacs-lisp/cl-lib.el (cl--gensym-counter): Remove. (cl--random-time): Move to near only remaining use. * lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Initialize to 0.
Diffstat (limited to 'doc/misc/cl.texi')
-rw-r--r--doc/misc/cl.texi15
1 files changed, 3 insertions, 12 deletions
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index d7b3f4a0a68..1f38ca98c62 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -2877,14 +2877,8 @@ their names will not conflict with ``real'' variables in the user's
2877code. 2877code.
2878 2878
2879(Internally, the variable @code{cl--gensym-counter} holds the counter 2879(Internally, the variable @code{cl--gensym-counter} holds the counter
2880used to generate names. It is incremented after each use. In Common 2880used to generate names. It is initialized with zero and incremented
2881Lisp this is initialized with 0, but this package initializes it with 2881after each use.)
2882a random time-dependent value to avoid trouble when two files that
2883each used @code{cl-gensym} in their compilation are loaded together.
2884Uninterned symbols become interned when the compiler writes them out
2885to a file and the Emacs loader loads them, so their names have to be
2886treated a bit more carefully than in Common Lisp where uninterned
2887symbols remain uninterned after loading.)
2888@end defun 2882@end defun
2889 2883
2890@defun cl-gentemp &optional x 2884@defun cl-gentemp &optional x
@@ -4543,10 +4537,7 @@ example, local @code{special} declarations, which are purely
4543advisory in Emacs Lisp, do not rigorously obey the scoping rules 4537advisory in Emacs Lisp, do not rigorously obey the scoping rules
4544set down in Steele's book. 4538set down in Steele's book.
4545 4539
4546The variable @code{cl--gensym-counter} starts out with a pseudo-random 4540The variable @code{cl--gensym-counter} starts out with zero.
4547value rather than with zero. This is to cope with the fact that
4548generated symbols become interned when they are written to and
4549loaded back from a file.
4550 4541
4551The @code{cl-defstruct} facility is compatible, except that structures 4542The @code{cl-defstruct} facility is compatible, except that structures
4552are of type @code{:type vector :named} by default rather than some 4543are of type @code{:type vector :named} by default rather than some