From 51703705e78279ddc49148d767dfebe26b9323b5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 11 Jun 2026 10:41:48 +0300 Subject: [PATCH] ; Fix last change * etc/NEWS: * doc/lispref/variables.texi (Creating Buffer-Local): Improve wording of last change's documentation. (Bug#81111) --- doc/lispref/variables.texi | 14 +++++++------- etc/NEWS | 17 +++++++++-------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 5df1b890817..78b01888a1b 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -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 diff --git a/etc/NEWS b/etc/NEWS index a04f8af0832..b60d1788e91 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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.