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