aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2023-12-24 09:31:32 +0200
committerEli Zaretskii2023-12-24 09:31:32 +0200
commit43cacc31be36f62034b4a163d05b56de1ef1bdf9 (patch)
tree716e5fc1517ecd81c8a27da7bbd4a99701681cdf /src
parentb7fc3ab787d8dd926e1912e51e99f0efcf57cb02 (diff)
downloademacs-43cacc31be36f62034b4a163d05b56de1ef1bdf9.tar.gz
emacs-43cacc31be36f62034b4a163d05b56de1ef1bdf9.zip
; * src/eval.c (Fdefvar): Doc fix (bug#67991).
Diffstat (limited to 'src')
-rw-r--r--src/eval.c10
1 files 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,
792You are not required to define a variable in order to use it, but 792You are not required to define a variable in order to use it, but
793defining it lets you supply an initial value and documentation, which 793defining it lets you supply an initial value and documentation, which
794can be referred to by the Emacs help facilities and other programming 794can be referred to by the Emacs help facilities and other programming
795tools. The `defvar' form also declares the variable as \"special\", 795tools.
796so that it is always dynamically bound even if `lexical-binding' is t.
797 796
798If SYMBOL's value is void and the optional argument INITVALUE is 797If SYMBOL's value is void and the optional argument INITVALUE is
799provided, INITVALUE is evaluated and the result used to set SYMBOL's 798provided, 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;
801buffer-local values are not affected. If INITVALUE is missing, 800buffer-local values are not affected. If INITVALUE is missing,
802SYMBOL's value is not set. 801SYMBOL's value is not set.
803 802
803If INITVALUE is provided, the `defvar' form also declares the variable
804as \"special\", so that it is always dynamically bound even if
805`lexical-binding' is t. If INITVALUE is missing, the form marks the
806variable \"special\" locally (i.e., within the current
807lexical scope, or the current file, if the form is at top-level),
808and does nothing if `lexical-binding' is nil.
809
804If SYMBOL is let-bound, then this form does not affect the local let 810If SYMBOL is let-bound, then this form does not affect the local let
805binding but the toplevel default binding instead, like 811binding but the toplevel default binding instead, like
806`set-toplevel-default-binding`. 812`set-toplevel-default-binding`.