diff options
| author | Alan Mackenzie | 2016-12-29 20:52:02 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-12-30 08:56:28 +0000 |
| commit | e8f0d7dcadd2b35f62f7a14b96df15e5314d7f6e (patch) | |
| tree | 67a59f73ec55efc5e83068596d4fbe995091469d /src | |
| parent | af1b1026dd4fe5632a08f607aa5adc189ecadf2a (diff) | |
| download | emacs-e8f0d7dcadd2b35f62f7a14b96df15e5314d7f6e.tar.gz emacs-e8f0d7dcadd2b35f62f7a14b96df15e5314d7f6e.zip | |
Backport: Remove an ambiguity from defvar's doc string. Fixes bug #25292.
The ambiguity was whether INITVALUE is evaluated when it's not going to be
used to set SYMBOL's value.
* src/eval.c (defvar): Rewrite a paragraph of the doc string.
(cherry picked from commit 8295e97f18490a535d1188a3daf0b0fd1bf4fa0d)
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c index b94712d4579..0380b115195 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -704,10 +704,11 @@ can be referred to by the Emacs help facilities and other programming | |||
| 704 | tools. The `defvar' form also declares the variable as \"special\", | 704 | tools. The `defvar' form also declares the variable as \"special\", |
| 705 | so that it is always dynamically bound even if `lexical-binding' is t. | 705 | so that it is always dynamically bound even if `lexical-binding' is t. |
| 706 | 706 | ||
| 707 | The optional argument INITVALUE is evaluated, and used to set SYMBOL, | 707 | If SYMBOL's value is void and the optional argument INITVALUE is |
| 708 | only if SYMBOL's value is void. If SYMBOL is buffer-local, its | 708 | provided, INITVALUE is evaluated and the result used to set SYMBOL's |
| 709 | default value is what is set; buffer-local values are not affected. | 709 | value. If SYMBOL is buffer-local, its default value is what is set; |
| 710 | If INITVALUE is missing, SYMBOL's value is not set. | 710 | buffer-local values are not affected. If INITVALUE is missing, |
| 711 | SYMBOL's value is not set. | ||
| 711 | 712 | ||
| 712 | If SYMBOL has a local binding, then this form affects the local | 713 | If SYMBOL has a local binding, then this form affects the local |
| 713 | binding. This is usually not what you want. Thus, if you need to | 714 | binding. This is usually not what you want. Thus, if you need to |