GNU bug report logs - #47388
27.1; eldoc-documentation-function is ignore in updated eldoc

Previous Next

Package: emacs;

Reported by: Alex Branham <alex.branham <at> gmail.com>

Date: Thu, 25 Mar 2021 14:06:01 UTC

Severity: normal

Found in version 27.1

Done: Alex Branham <alex.branham <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: João Távora <joaotavora <at> gmail.com>
To: Alex Branham <alex.branham <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 47388 <at> debbugs.gnu.org
Subject: Re: bug#47388: 27.1; eldoc-documentation-function is ignore in
 updated eldoc
Date: Sat, 27 Mar 2021 12:53:13 +0000
[Message part 1 (text/plain, inline)]
On Sat, Mar 27, 2021 at 12:06 PM Alex Branham <alex.branham <at> gmail.com>
wrote:

> On Fri 26 Mar 2021 at 20:34, João Távora <joaotavora <at> gmail.com> wrote:
>
> > Ah, I get it, so ess-mode does something different.
>
> I'm not sure I understand - different from what?
>

It does different things depending on the situation it thinks
it finds itself in.

(if (function-equal #'ignore eldoc-documentation-function)
>     (add-hook 'eldoc-documentation-functions #'ess-r-eldoc-function nil t)
>   (add-function :before-until (local 'eldoc-documentation-function)
>                 #'ess-r-eldoc-function))
>

I'm not sure you're improving much here.  My idea is that,
if you find eldoc-documentation-functions (plural) to be bound you
may need to check that eldoc-documentation-strategy (or
eldoc-documentation-function (singular)) ISN'T #ignore and
buffer-locally adjust it accordingly to something of your preference
or your users' preference.

Alternatively, you can just keep using the old technique which is a lot
of parts of Emacs do (like elisp-mode in Emacs 27.1, for example), i.e.
use the else branch in your if, and only that.  You don't seem to be using a
ny of the new ElDoc features like multiple documentation functions anyway.
That should also work for your Eglot-less rss-mode.

When using Eglot-ified rss-mode Eglot will do the right thing regardless
of the approach you take above.

All this said, I think this issue should be kept open nonetheless. If indeed
the new package's defcustom could clobber the global value of
eldoc-documentation-function if it finds it to be #'ignore I think it
should
be fine.

CC-ing Stefan Monnier for an opinion on this last part.

João Távora
[Message part 2 (text/html, inline)]

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

Previous Next


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