* bug#40714: Reinitialising the major mode disables which-function-mode.
@ 2020-04-19 11:12 Alan Mackenzie
[not found] ` <handler.40714.B.15872947623585.ack@debbugs.gnu.org>
0 siblings, 1 reply; 2+ messages in thread
From: Alan Mackenzie @ 2020-04-19 11:12 UTC (permalink / raw)
To: 40714
Hello, Emacs.
In a typical buffer, say an emacs-lisp-mode buffer, with
which-function-mode enabled and working, do
M-x emacs-lisp-mode
. which-function-mode is no longer working.
#########################################################################
The cause of this is that the enablement of w-f-m is stored in a buffer
local variable which-func-mode. This local variable gets killed on
reinitialising the major mode. There is nothing to set it to non-nil
again.
When visiting a file, which-func-mode gets set in a file-find-hook
function called which-func-ff-hook.
Suggested fix: Move which-func-ff-hook to after-change-major-mode-hook
(renaming it, of course).
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-20 18:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-19 11:12 bug#40714: Reinitialising the major mode disables which-function-mode Alan Mackenzie
[not found] ` <handler.40714.B.15872947623585.ack@debbugs.gnu.org>
2020-05-20 18:08 ` bug#40714: Acknowledgement (Reinitialising the major mode disables which-function-mode.) Alan Mackenzie
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.