aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-02-08 13:47:11 +0200
committerEli Zaretskii2025-02-08 13:47:11 +0200
commit223ee56aae7cf052419cf026bce4d7ea29671286 (patch)
treee924d6502fd94c7daa522db7f1622cc440e28c1d
parentbe4cf26c16794021ae790f1eb82fccea6efaa354 (diff)
downloademacs-223ee56aae7cf052419cf026bce4d7ea29671286.tar.gz
emacs-223ee56aae7cf052419cf026bce4d7ea29671286.zip
; Avoid passive tense in Emacs manual
* doc/lispref/variables.texi (Defining Variables): Avoid passive tense (bug#76135).
-rw-r--r--doc/lispref/variables.texi48
1 files changed, 26 insertions, 22 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index b56dfb6077b..7bc9243649c 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -499,33 +499,37 @@ initializes it only if it is originally void.
499Definitions}. 499Definitions}.
500 500
501@defspec defvar symbol [value [doc-string]] 501@defspec defvar symbol [value [doc-string]]
502This special form defines @var{symbol} as a variable. Note that 502This special form defines @var{symbol} as a variable and optionally
503@var{symbol} is not evaluated; the symbol to be defined should appear 503initializes and documents it. Note that it doesn't evaluate
504explicitly in the @code{defvar} form. The variable is marked as 504@var{symbol}; the symbol to be defined should appear explicitly in the
505@dfn{special}, meaning that it should always be dynamically bound 505@code{defvar} form. @code{defvar} also marks @var{symbol} as
506@dfn{special}, meaning that its bindings should always be dynamic
506(@pxref{Variable Scoping}). 507(@pxref{Variable Scoping}).
507 508
508If @var{value} is specified, and @var{symbol} is void (i.e., it has no 509If @var{value} is specified, and @var{symbol} is void (i.e., it has no
509dynamically bound value; @pxref{Void Variables}), then @var{value} is 510dynamically bound value; @pxref{Void Variables}), then @code{defvar}
510evaluated and @var{symbol} is set to the result. But if @var{symbol} 511evaluates @var{value}, and initializes @var{symbol} by setting it to the
511is not void, @var{value} is not evaluated, and @var{symbol}'s value is 512result of the evaluation. But if @var{symbol} is not void,
512left unchanged. If @var{value} is omitted, the value of @var{symbol} 513@code{defvar} does not evaluate @var{value}, and leaves @var{symbol}'s
513is not changed in any case. 514value unchanged. If @var{value} is omitted, @code{defvar} doesn't
515change the value of @var{symbol} in any case.
514 516
515Note that specifying a value, even @code{nil}, marks the variable as 517Note that specifying a value, even @code{nil}, marks the variable as
516special permanently. Whereas if @var{value} is omitted then the 518special permanently. Whereas if @var{value} is omitted, then
517variable is only marked special locally (i.e.@: within the current 519@code{defvar} marks the variable special only locally (i.e.@: within the
518lexical scope, or file if at the top-level). This can be useful for 520current lexical scope, or within the current file, if @code{defvar} is
519suppressing byte compilation warnings, see @ref{Compiler Errors}. 521at the top-level). This can be useful for suppressing byte compilation
520 522warnings, see @ref{Compiler Errors}.
521If @var{symbol} has a buffer-local binding in the current buffer, 523
522@code{defvar} acts on the default value, which is buffer-independent, 524If @var{symbol} has a buffer-local binding in the current buffer, and
523rather than the buffer-local binding. It sets the default value if 525@var{value} is specified, @code{defvar} modifies the default value of
524the default value is void. @xref{Buffer-Local Variables}. 526@var{symbol}, which is buffer-independent, rather than the buffer-local
525 527binding. It sets the default value if the default value is void.
526If @var{symbol} is already let bound (e.g., if the @code{defvar} 528@xref{Buffer-Local Variables}.
527form occurs in a @code{let} form), then @code{defvar} sets the toplevel 529
528default value, like @code{set-default-toplevel-value}. 530If @var{symbol} is already let bound (e.g., if the @code{defvar} form
531occurs in a @code{let} form), then @code{defvar} sets the toplevel
532default value of @var{symbol}, like @code{set-default-toplevel-value}.
529The let binding remains in effect until its binding construct exits. 533The let binding remains in effect until its binding construct exits.
530@xref{Variable Scoping}. 534@xref{Variable Scoping}.
531 535