From ee666f840976d56671e3cec56ab9f5152afb2dcc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 15 Oct 2008 11:49:10 +0000 Subject: [PATCH] (Creating Buffer-Local): Add an xref to "Setting Hooks" for the effect of kill-all-local-variables on local hook functions. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/variables.texi | 6 ++++-- etc/NEWS | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index d00f0cb06a8..e12c210061e 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,9 @@ 2008-10-15 Eli Zaretskii + * variables.texi (Creating Buffer-Local): Add an xref to "Setting + Hooks" for the effect of kill-all-local-variables on local hook + functions. + * modes.texi (Major Mode Conventions, Mode Line Variables): `mode-name' need not be a string. xref to "Mode Line Data" for details, and to "Emulating Mode Line" for computing a string diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 55422b7508d..b02bdd8a9fe 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1361,8 +1361,10 @@ buffer-local variables interactively. @defun kill-all-local-variables This function eliminates all the buffer-local variable bindings of the -current buffer except for variables marked as ``permanent.'' As a -result, the buffer will see the default values of most variables. +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. 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 20ea28eaf20..a11cf88f40d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1113,6 +1113,7 @@ don't, these primitives will return nil. ** New variable `user-emacs-directory'. Use this instead of "~/.emacs.d". ++++ ** If a local hook function has a non-nil `permanent-local-hook' property, `kill-all-local-variables' does not remove it from the local value of the hook variable; it remains even if you change major modes. -- 2.39.5