GNU bug report logs - #19853
25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Fri, 13 Feb 2015 11:57:01 UTC

Severity: normal

Found in version 25.0.50

Fixed in version 26.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 19853 <at> debbugs.gnu.org
Subject: Re: bug#19853: Acknowledgement (25.0.50;
 ElDoc is displayed whether eldoc-mode is enabled or not)
Date: Sun, 20 Mar 2016 20:53:55 +0100
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 03/20/2016 09:20 PM, Michael Heerdegen wrote:
>
> > Turning on the globalized local hook would not have an immediate effect
> > on the affected buffers I think.
>
> Not sure what you mean. Globalized local hook?
>
> If globalized mode was off, and you turn it on, it turns on the local
> mode in all relevant buffers, right away.
>
> Just try it with e.g. global-font-lock-mode.

Yes, correct.  I only overflew the sources and missed that part - my
mistake.


> > That's a valid point, the current implementation doesn't cover this
> > case.  I think
> >
> >   (setq-local global-eldoc-mode nil)
> >
> > should work, but it looks weird, and it should not be necessary to
> > modify a variable after we already have two modes.
>
> Yes, it looks silly, and might even break some expectations of the
> minor mode machinery.

If we want the global mode to push its stuff into the global hook
bindings, and not into all the local hook bindings in every single
buffer where the mode is applicable - can we achieve this with
`define-globalized-minor-mode'?  It doesn't seem so:
`define-globalized-minor-mode' doesn't accept any kind of BODY argument.
I think this is the cause of why the author reinvented it, and that in a
not fully compliant way.

Eldoc is not the only mode where this problem arises.  In general, it
can be beneficial to add to the global hook bindings: when a buffer is
affected by the global hook, but it is not current, the local hook
bindings are not run.  Sometimes this is useful (I can give an example
if you want).

But in this case, I think it is not.  So I tend to agree with you:
simply globalizing eldoc-mode would be better, if we don't miss
anything.

And then, I think making `define-globalized-minor-mode' accept a BODY
argument would be good - a globalized minor mode might want to do some
global setup.


Michael.




This bug report was last modified 8 years and 50 days ago.

Previous Next


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