GNU bug report logs -
#68981
[PATCH] Add support for deriving major modes in which-func
Previous Next
Reported by: Damien Cassou <damien <at> cassou.me>
Date: Wed, 7 Feb 2024 19:53:01 UTC
Severity: normal
Tags: patch
Fixed in version 30.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 10 Feb 2024 05:10:29 -0600
with message-id <CADwFkmkQjNHNo3+wLX-7vK_+_Yb6_C-eb64+hHAWB5pxOBpOwg <at> mail.gmail.com>
and subject line Re: bug#68981: [PATCH] Add support for deriving major modes in which-func
has caused the debbugs.gnu.org bug report #68981,
regarding [PATCH] Add support for deriving major modes in which-func
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
68981: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68981
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Tags: patch
Hi,
I wanted to configure which-func to activate only for programmation
modes so I wrote:
(use-package which-func
:init
(progn
(setq which-func-modes '(prog-mode)))
:config
(progn
(which-function-mode)))
But this doesn't work because which-func only checks for exact major
modes, not derived ones: because emacs-lisp-mode is not in
`which-func-modes`, I won't get which-func to activate in
emacs-lisp-mode even though I want it.
I wrote the attached patch so which-func uses `derived-mode-p'. This
solves my issue.
--
Damien Cassou
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
[0001-Add-support-for-deriving-major-modes-in-which-func.patch (text/patch, attachment)]
[Message part 5 (message/rfc822, inline)]
Version: 30.1
Damien Cassou <damien <at> cassou.me> writes:
> I wanted to configure which-func to activate only for programmation
> modes so I wrote:
>
> (use-package which-func
> :init
> (progn
> (setq which-func-modes '(prog-mode)))
> :config
> (progn
> (which-function-mode)))
>
> But this doesn't work because which-func only checks for exact major
> modes, not derived ones: because emacs-lisp-mode is not in
> `which-func-modes`, I won't get which-func to activate in
> emacs-lisp-mode even though I want it.
>
> I wrote the attached patch so which-func uses `derived-mode-p'. This
> solves my issue.
Thanks, pushed to master as commit 657d2c11337. Closing.
This bug report was last modified 1 year and 160 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.