[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 8295e97: Remove an ambiguity from defvar's doc stri
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] master 8295e97: Remove an ambiguity from defvar's doc string. Fixes bug #25292. |
Date: |
Thu, 29 Dec 2016 20:54:16 +0000 (UTC) |
branch: master
commit 8295e97f18490a535d1188a3daf0b0fd1bf4fa0d
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
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.
---
src/eval.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/eval.c b/src/eval.c
index e50e26a..240b0ff 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -716,10 +716,11 @@ can be referred to by the Emacs help facilities and other
programming
tools. The `defvar' form also declares the variable as \"special\",
so that it is always dynamically bound even if `lexical-binding' is t.
-The optional argument INITVALUE is evaluated, and used to set SYMBOL,
-only if SYMBOL's value is void. If SYMBOL is buffer-local, its
-default value is what is set; buffer-local values are not affected.
-If INITVALUE is missing, SYMBOL's value is not set.
+If SYMBOL's value is void and the optional argument INITVALUE is
+provided, INITVALUE is evaluated and the result used to set SYMBOL's
+value. If SYMBOL is buffer-local, its default value is what is set;
+buffer-local values are not affected. If INITVALUE is missing,
+SYMBOL's value is not set.
If SYMBOL has a local binding, then this form affects the local
binding. This is usually not what you want. Thus, if you need to
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 8295e97: Remove an ambiguity from defvar's doc string. Fixes bug #25292.,
Alan Mackenzie <=