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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alan Mackenzie <acm <at> muc.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#40714: closed (Reinitialising the major mode disables
 which-function-mode.)
Date: Wed, 20 May 2020 18:09:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 20 May 2020 18:08:42 +0000
with message-id <20200520180842.GA19724 <at> ACM>
and subject line Re: bug#40714: Acknowledgement (Reinitialising the major mode disables which-function-mode.)
has caused the debbugs.gnu.org bug report #40714,
regarding Reinitialising the major mode disables which-function-mode.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
40714: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40714
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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).


[Message part 3 (message/rfc822, inline)]
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).


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.