; Fix last change

* etc/NEWS:
* doc/lispref/variables.texi (Creating Buffer-Local): Improve
wording of last change's documentation.  (Bug#81111)
This commit is contained in:
Eli Zaretskii 2026-06-11 10:41:48 +03:00
parent c6c4888ced
commit 51703705e7
2 changed files with 16 additions and 15 deletions

View file

@ -1748,13 +1748,13 @@ local hook functions that have a non-@code{nil}
killed, but if the optional @var{kill-permanent} argument is
non-@code{nil}, even those variables will be killed.
If @var{kill-permanent} is the symbol @code{permanent-local} the
function @code{kill-all-local-variables} kills local variables and
ignores any variable watchers. If it is the symbol @code{reset},
variable watchers are ignored and the buffer is reset as if the buffer
was newly created. Use the foregoing with caution: For example,
@code{reset} sets buffer variables such as @code{default-directory} to
@code{nil} and may result in unexpected behavior.
If @var{kill-permanent} is the symbol @code{permanent-local}, this
function kills local variables and ignores any variable watchers. If it
is the symbol @code{reset}, the function ignores variable watchers and
resets the buffer as if the buffer was newly created. Use these values
with caution: for example, @code{reset} sets buffer variables such as
@code{default-directory} to @code{nil} and thus may result in unexpected
behavior.
This function also resets certain other information pertaining to the
buffer: it sets the local keymap to @code{nil}, the syntax table to the

View file

@ -139,17 +139,18 @@ To install the grammars, use 'M-x markdown-ts-mode-install-parsers'.
+++
** 'kill-all-local-variables' can kill locals silently and reset the buffer.
This function's KILL-PERMANENT argument now accepts 'permanent-local'
which kills all locals ignoring any variable watchers, and also 'reset'
which does what 'permanent-local' does and also resets the buffer as if
newly created. Use these with caution to avoid unexpected behavior such
as 'default-directory' being reset to nil.
This function's KILL-PERMANENT argument now accepts the value
'permanent-local', which kills all locals ignoring any variable
watchers. That argument can also be 'reset', which does what
'permanent-local' does, and also resets the buffer as if it were newly
created. Use these with caution to avoid unexpected behavior such as
'default-directory' being reset to nil.
---
** 'with-work-buffer' kills all locals silently and resets its buffers.
This macro, when returning a buffer to its share buffer pool, now kills
all buffer locals silently, ignoring any variable watchers, and resets
the buffer as if newly created.
When this macro returns a buffer to its buffer pool, it now kills all
buffer locals silently, ignoring any variable watchers, and resets the
buffer as if it were newly created.
+++
** The new function 'markers-in' returns the set of markers in a region.