Subject: Re: bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)

From: Michael Heerdegen <[email-masked]>
Date: Sun, 20 Mar 2016 20:20:26 +0100

Dmitry Gutov <[email-masked]> writes:

> On 03/20/2016 08:34 PM, Michael Heerdegen wrote:
>
> >> That's not true: turning off a globalized mode turns off the related
> >> minor mode in all buffers. So, instant effect as well.
> >
> > Right, but turning on is different, right?
>
> Different how?

Turning on the globalized local hook would not have an immediate effect
on the affected buffers I think.

> >> I did provide a recipe, in the bug description.
> >
> > I thought you mean a lighter, but you mean the effect of eldoc mode:
> > echoing in the echo area with "ElDoc is displayed", correct?
>
> In the echo area, but not "ElDoc is displayed" (is there such a
> message anywhere?).

Yes, in your recipe in the bug description.  My question was what you
meant with that.

> - The behavior is surprising if you're used to globalized minor modes.

What behavior do you mean, apart from the next point?

> - There's no way to have ElDoc enabled by default, but disable it in
> just certain buffers.

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.

Michael.