@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},
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
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. */)
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)