diff options
| -rw-r--r-- | doc/misc/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/misc/cl.texi | 38 | ||||
| -rw-r--r-- | etc/NEWS | 5 |
3 files changed, 18 insertions, 27 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 6bd601bef5d..62308037fec 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | (List Functions): Remove copy-tree, standard elisp for some time. | 4 | (List Functions): Remove copy-tree, standard elisp for some time. |
| 5 | (Efficiency Concerns): Comment out examples that no longer apply. | 5 | (Efficiency Concerns): Comment out examples that no longer apply. |
| 6 | (Compiler Optimizations): Rename from "Optimizing Compiler"; reword. | 6 | (Compiler Optimizations): Rename from "Optimizing Compiler"; reword. |
| 7 | (Creating Symbols, Random Numbers): De-emphasize internal | ||
| 8 | variables cl--gensym-counter and cl--random-state. (Bug#12788) | ||
| 7 | 9 | ||
| 8 | 2012-11-02 Glenn Morris <rgm@gnu.org> | 10 | 2012-11-02 Glenn Morris <rgm@gnu.org> |
| 9 | 11 | ||
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 1b1a3f9836f..e182c2600f9 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi | |||
| @@ -2874,21 +2874,17 @@ string is used as a prefix instead of @samp{G}. Uninterned symbols | |||
| 2874 | are used in macro expansions for temporary variables, to ensure that | 2874 | are used in macro expansions for temporary variables, to ensure that |
| 2875 | their names will not conflict with ``real'' variables in the user's | 2875 | their names will not conflict with ``real'' variables in the user's |
| 2876 | code. | 2876 | code. |
| 2877 | @end defun | ||
| 2878 | 2877 | ||
| 2879 | @c FIXME texinfo renders this as as cl-gensym-counter in info. | 2878 | (Internally, the variable @code{cl--gensym-counter} holds the counter |
| 2880 | @c It looks fine in the index, and in the pdf version. | 2879 | used to generate names. It is incremented after each use. In Common |
| 2881 | @defvar cl--gensym-counter | 2880 | Lisp this is initialized with 0, but this package initializes it with |
| 2882 | This variable holds the counter used to generate @code{cl-gensym} names. | 2881 | a random time-dependent value to avoid trouble when two files that |
| 2883 | It is incremented after each use by @code{cl-gensym}. In Common Lisp | ||
| 2884 | this is initialized with 0, but this package initializes it with a | ||
| 2885 | random (time-dependent) value to avoid trouble when two files that | ||
| 2886 | each used @code{cl-gensym} in their compilation are loaded together. | 2882 | each used @code{cl-gensym} in their compilation are loaded together. |
| 2887 | (Uninterned symbols become interned when the compiler writes them | 2883 | Uninterned symbols become interned when the compiler writes them out |
| 2888 | out to a file and the Emacs loader loads them, so their names have to | 2884 | to a file and the Emacs loader loads them, so their names have to be |
| 2889 | be treated a bit more carefully than in Common Lisp where uninterned | 2885 | treated a bit more carefully than in Common Lisp where uninterned |
| 2890 | symbols remain uninterned after loading.) | 2886 | symbols remain uninterned after loading.) |
| 2891 | @end defvar | 2887 | @end defun |
| 2892 | 2888 | ||
| 2893 | @defun cl-gentemp &optional x | 2889 | @defun cl-gentemp &optional x |
| 2894 | This function is like @code{cl-gensym}, except that it produces a new | 2890 | This function is like @code{cl-gensym}, except that it produces a new |
| @@ -3051,22 +3047,14 @@ This function returns a random nonnegative number less than | |||
| 3051 | The @var{state} argument should be a @code{random-state} object | 3047 | The @var{state} argument should be a @code{random-state} object |
| 3052 | that holds the state of the random number generator. The | 3048 | that holds the state of the random number generator. The |
| 3053 | function modifies this state object as a side effect. If | 3049 | function modifies this state object as a side effect. If |
| 3054 | @var{state} is omitted, it defaults to the variable | 3050 | @var{state} is omitted, it defaults to the internal variable |
| 3055 | @code{cl--random-state}, which contains a pre-initialized | 3051 | @code{cl--random-state}, which contains a pre-initialized |
| 3056 | @code{random-state} object. | 3052 | default @code{random-state} object. (Since any number of programs in |
| 3053 | the Emacs process may be accessing @code{cl--random-state} in | ||
| 3054 | interleaved fashion, the sequence generated from this will be | ||
| 3055 | irreproducible for all intents and purposes.) | ||
| 3057 | @end defun | 3056 | @end defun |
| 3058 | 3057 | ||
| 3059 | @c FIXME texinfo renders this as cl-random-state in info. | ||
| 3060 | @c It looks fine in the index, and in the pdf version. | ||
| 3061 | @defvar cl--random-state | ||
| 3062 | This variable contains the system ``default'' @code{random-state} | ||
| 3063 | object, used for calls to @code{cl-random} that do not specify an | ||
| 3064 | alternative state object. Since any number of programs in the | ||
| 3065 | Emacs process may be accessing @code{cl--random-state} in interleaved | ||
| 3066 | fashion, the sequence generated from this variable will be | ||
| 3067 | irreproducible for all intents and purposes. | ||
| 3068 | @end defvar | ||
| 3069 | |||
| 3070 | @defun cl-make-random-state &optional state | 3058 | @defun cl-make-random-state &optional state |
| 3071 | This function creates or copies a @code{random-state} object. | 3059 | This function creates or copies a @code{random-state} object. |
| 3072 | If @var{state} is omitted or @code{nil}, it returns a new copy of | 3060 | If @var{state} is omitted or @code{nil}, it returns a new copy of |
| @@ -302,6 +302,7 @@ Customize `cal-html-holidays' to change this. | |||
| 302 | 302 | ||
| 303 | ** CL | 303 | ** CL |
| 304 | 304 | ||
| 305 | +++ | ||
| 305 | *** CL's main entry is now (require 'cl-lib). | 306 | *** CL's main entry is now (require 'cl-lib). |
| 306 | `cl-lib' is like the old `cl' except that it uses the namespace cleanly, | 307 | `cl-lib' is like the old `cl' except that it uses the namespace cleanly, |
| 307 | i.e. all its definitions have the "cl-" prefix (and internal definitions use | 308 | i.e. all its definitions have the "cl-" prefix (and internal definitions use |
| @@ -312,8 +313,8 @@ under the name `cl-foo' instead, with the exceptions of the few definitions | |||
| 312 | that had to use `foo*' to avoid conflicts with pre-existing Elisp entities, | 313 | that had to use `foo*' to avoid conflicts with pre-existing Elisp entities, |
| 313 | which have not been renamed to `cl-foo*' but just `cl-foo'. | 314 | which have not been renamed to `cl-foo*' but just `cl-foo'. |
| 314 | 315 | ||
| 315 | The old `cl' is now deprecated and is just a bunch of aliases that | 316 | The old `cl' is now deprecated and is mainly just a bunch of aliases that |
| 316 | provide the old non-prefixed names. | 317 | provide the old non-prefixed names. Some exceptions are listed below. |
| 317 | 318 | ||
| 318 | +++ | 319 | +++ |
| 319 | *** `cl-flet' is not like `flet' (which is deprecated). | 320 | *** `cl-flet' is not like `flet' (which is deprecated). |