diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-06 12:53:07 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-06 12:55:21 +0200 |
commit | c0f7396588080ac48b72b905880d3f488e5becb3 (patch) | |
tree | 7f59d19cf3730746312813bdc86559c5504dc1b9 /doc/lispref/variables.texi | |
parent | ff31741b85593635e96cf67fea8fbc015cbbb582 (diff) | |
download | emacs-c0f7396588080ac48b72b905880d3f488e5becb3.tar.gz |
Add an optional parameter to kill-all-local-variables
* doc/lispref/variables.texi (Creating Buffer-Local): Document it
(bug#30204).
* src/buffer.c (Fkill_all_local_variables): Allow killing
permanent local variables, too.
* src/print.c (temp_output_buffer_setup):
* src/minibuf.c (set_minibuffer_mode): Adjust callers.
Diffstat (limited to 'doc/lispref/variables.texi')
-rw-r--r-- | doc/lispref/variables.texi | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index a1d1919b4bf..d2247004bcb 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1695,12 +1695,14 @@ buffer-local variables interactively. @end deffn @cindex local variables, killed by major mode -@defun kill-all-local-variables +@defun kill-all-local-variables &optional kill-permanent This function eliminates all the buffer-local variable bindings of the -current buffer except for variables marked as permanent and local -hook functions that have a non-@code{nil} @code{permanent-local-hook} -property (@pxref{Setting Hooks}). As a result, the buffer will see -the default values of most variables. +current buffer. As a result, the buffer will see the default values +of most variables. By default, for variables marked as permanent and +local hook functions that have a non-@code{nil} +@code{permanent-local-hook} property (@pxref{Setting Hooks}) won't be +killed, but if the optional @var{kill-permanent} argument is +non-@code{nil}, even these variables will be killed. This function also resets certain other information pertaining to the buffer: it sets the local keymap to @code{nil}, the syntax table to the |