From: Alan Mackenzie <acm@muc.de>
To: 40714@debbugs.gnu.org
Subject: bug#40714: Reinitialising the major mode disables which-function-mode.
Date: Sun, 19 Apr 2020 11:12:33 +0000 [thread overview]
Message-ID: <20200419111233.GA22022@ACM> (raw)
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).
next reply other threads:[~2020-04-19 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-19 11:12 Alan Mackenzie [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200419111233.GA22022@ACM \
--to=acm@muc.de \
--cc=40714@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).