GNU bug report logs -
#40714
Reinitialising the major mode disables which-function-mode.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Sun, 19 Apr 2020 11:13:01 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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).
This bug report was last modified 5 years ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.