GNU bug report logs - #40714
Reinitialising the major mode disables which-function-mode.

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40714 in the body.
You can then email your comments to 40714 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#40714; Package emacs. (Sun, 19 Apr 2020 11:13:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Mackenzie <acm <at> muc.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 19 Apr 2020 11:13:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Reinitialising the major mode disables which-function-mode.
Date: Sun, 19 Apr 2020 11:12:33 +0000
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).




Reply sent to Alan Mackenzie <acm <at> muc.de>:
You have taken responsibility. (Wed, 20 May 2020 18:09:02 GMT) Full text and rfc822 format available.

Notification sent to Alan Mackenzie <acm <at> muc.de>:
bug acknowledged by developer. (Wed, 20 May 2020 18:09:02 GMT) Full text and rfc822 format available.

Message #10 received at 40714-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: 40714-done <at> debbugs.gnu.org
Subject: Re: bug#40714: Acknowledgement (Reinitialising the major mode
 disables which-function-mode.)
Date: Wed, 20 May 2020 18:08:42 +0000
Bug fixed in master.

-- 
Alan Mackenzie (Nuremberg, Germany).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 18 Jun 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.