From: Eli Zaretskii Date: Thu, 15 May 2025 13:29:27 +0000 (+0300) Subject: ; Fix wording of recently-added documentation X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f70ba9ae5d5b56c8d5adf6b0d6cdf74d6247e369;p=emacs.git ; Fix wording of recently-added documentation * src/eval.c (Fset_buffer_local_toplevel_value) (Fbuffer_local_toplevel_value): * doc/lispref/variables.texi (Default Value): Fix wording of documentation. (cherry picked from commit db198e0e59bff0c1cb28a591928377f5a0e9d158) --- diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 005db3401b1..68c49589619 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1942,9 +1942,10 @@ the context of @var{symbol}'s let-binding. @end defun @cindex top-level buffer-local value - In addition, a variable's buffer-local value may be shadowed by a -let-binding. There are two further functions to get and set the -top-level buffer-local value of a variable. + A variable's buffer-local value may also be shadowed by a +let-binding. Two functions allow getting and setting the +top-level buffer-local value of a variable, i.e., the value outside of +the let-binding. @defun buffer-local-toplevel-value symbol &optional buffer This function returns the local value for @var{symbol} in @var{buffer}, @@ -1966,10 +1967,10 @@ function causes a local value for them to exist in @var{buffer}. If as the buffer-local value for the variable across changes of major mode. This is useful when you want to make a change to a buffer-local value -that will persist after the command now being executed completes, but +that will persist after the command now being executed completes, where your code may be executed with that variable let-bound. In this -case the usual tool for setting buffer-local values, @code{setq-local}, -will only change the value of the let-binding, and not the underlying +case the usual way of setting buffer-local values, using @code{setq-local}, +will only change the value inside the let-binding, and not the underlying buffer-local value. This function sets the latter. @end defun diff --git a/src/eval.c b/src/eval.c index e3cdcb24423..f447b5e9551 100644 --- a/src/eval.c +++ b/src/eval.c @@ -833,7 +833,7 @@ DEFUN ("set-default-toplevel-value", Fset_default_toplevel_value, DEFUN ("buffer-local-toplevel-value", Fbuffer_local_toplevel_value, Sbuffer_local_toplevel_value, 1, 2, 0, - doc: /* Return SYMBOL's toplevel local value in BUFFER. + doc: /* Return SYMBOL's toplevel buffer-local value in BUFFER. "Toplevel" means outside of any let binding. BUFFER defaults to the current buffer. If SYMBOL has no local value in BUFFER, signals an error. */) @@ -852,8 +852,8 @@ If SYMBOL has no local value in BUFFER, signals an error. */) DEFUN ("set-buffer-local-toplevel-value", Fset_buffer_local_toplevel_value, Sset_buffer_local_toplevel_value, 2, 3, 0, - doc: /* Set SYMBOL's toplevel local value to VALUE in BUFFER. -"Toplevel" means outside of any let binding. + doc: /* Set SYMBOL's toplevel buffer-local value in BUFFER to VALUE. +"Toplevel" means outside of any let-binding. BUFFER defaults to the current buffer. Makes SYMBOL buffer-local in BUFFER if it was not already. */) (Lisp_Object symbol, Lisp_Object value, Lisp_Object buffer)