emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 43cacc31be3: ; * src/eval.c (Fdefvar): Doc fix (bug#67991).


From: Eli Zaretskii
Subject: master 43cacc31be3: ; * src/eval.c (Fdefvar): Doc fix (bug#67991).
Date: Sun, 24 Dec 2023 02:32:02 -0500 (EST)

branch: master
commit 43cacc31be36f62034b4a163d05b56de1ef1bdf9
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; * src/eval.c (Fdefvar): Doc fix (bug#67991).
---
 src/eval.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index 30edaccdb62..5ae56292c75 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -792,8 +792,7 @@ DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0,
 You are not required to define a variable in order to use it, but
 defining it lets you supply an initial value and documentation, which
 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.
+tools.
 
 If SYMBOL's value is void and the optional argument INITVALUE is
 provided, INITVALUE is evaluated and the result used to set SYMBOL's
@@ -801,6 +800,13 @@ 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 INITVALUE is provided, the `defvar' form also declares the variable
+as \"special\", so that it is always dynamically bound even if
+`lexical-binding' is t.  If INITVALUE is missing, the form marks the
+variable \"special\" locally (i.e., within the current
+lexical scope, or the current file, if the form is at top-level),
+and does nothing if `lexical-binding' is nil.
+
 If SYMBOL is let-bound, then this form does not affect the local let
 binding but the toplevel default binding instead, like
 `set-toplevel-default-binding`.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]