Function: buffer-local-toplevel-value
buffer-local-toplevel-value is a function defined in eval.c.
Signature
(buffer-local-toplevel-value SYMBOL &optional BUFFER)
Documentation
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.
Probably introduced at or before Emacs version 31.1.
Source Code
// Defined in /usr/src/emacs/src/eval.c
{
if (NILP (buffer))
buffer = Fcurrent_buffer ();
if (NILP (Flocal_variable_p (symbol, buffer)))
xsignal1 (Qvoid_variable, symbol);
union specbinding *binding = local_toplevel_binding (symbol, buffer);
return binding
? specpdl_old_value (binding)
: Fbuffer_local_value (symbol, buffer);
}