unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Alex Branham <alex.branham@gmail.com>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	47388-done@debbugs.gnu.org
Subject: bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc
Date: Sun, 28 Mar 2021 19:45:47 +0100	[thread overview]
Message-ID: <87wntrdsmc.fsf@gmail.com> (raw)
In-Reply-To: <87v99buuud.fsf@gmail.com> (Alex Branham's message of "Sun, 28 Mar 2021 12:05:46 -0400")

Alex Branham <alex.branham@gmail.com> writes:

>>> If that's right, it seems like a step backwards, ease-of-setup-wise at
>>> least, from the simple
>>>
>>> (add-function :before-until (local 'eldoc-documentation-function)
>>> #'ess-r-eldoc-function)
>>
>> You can still just that and call it a day.  Just that, because the new
>> eldoc in the yet-unreleased Emacs 28 is backward compatible.  I've tried
>> to explain this three times already in this exchange.
>
> Thanks. I'd like to support the new way (so users can customize
> eldoc-documentation-function) and the old way, which I thought I had
> said previously. It seems like the above is the officially blessed way
> to do both so I suppose that's what we'll go with.

No idea what the "above" is, let me just summarize the cases:

(1) You have Emacs <= 27.1 and no new eldoc.el package
(2) You have Emacs <= 27.1 and a new eldoc.el package
(3) You have Emacs >= 28

The typical (fboundp 'eldoc-documentation-functions) check works great
for cases 1 and 3: you support the new and the old way.  Now, sometime
in 2020 I introduced the possibility of delivering new Eldoc features to
released versions, via the Eldoc ELPA "core" package.  That gave rise to
case 2: it's offering a new possiblity to support new Eldoc features
early, it doesn't remove any possibilities.

So:

a) If you want to support the new Eldoc features in cases 2 and 3, you
   have to use the more complex snippet (with or without the
   byte-compiler warning, you decide if it bothers you)

b) If, on the other hand, you just want to support 1 and 3, just use a
   check on emacs-major-version, instead of the fboundp check.

c) If you're confident that your users won't be missing the new eldoc.el
   features in rss-mode specifically (there's a good chance they won't
   since it's presumably what they're used to in rss-mode), just use the
   simple :before-until snippet.  And if these users do install something
   like Eglot, it will take care to do the right thing.

d) If you want to only support 2 and 3, and join the wave of the future,
   you can: Just make the eldoc.el ELPA package a dependency of the
   rss-mode, much like Eglot.

So I think you have lots of options here.

João







  reply	other threads:[~2021-03-28 18:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 14:05 bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc Alex Branham
2021-03-26 18:27 ` Basil L. Contovounesios
2021-03-26 18:50   ` João Távora
2021-03-26 19:08     ` Alex Branham
2021-03-26 19:57       ` João Távora
2021-03-26 20:23         ` Alex Branham
2021-03-26 20:34           ` João Távora
2021-03-27 12:06             ` Alex Branham
2021-03-27 12:53               ` João Távora
2021-03-28 11:23                 ` Alex Branham
2021-03-28 14:50                   ` João Távora
2021-03-28 16:05                     ` Alex Branham
2021-03-28 18:45                       ` João Távora [this message]
2021-03-28 16:37                     ` Stefan Monnier
2021-03-28 18:56                       ` João Távora
2021-03-28 19:09                         ` Stefan Monnier
2021-03-28 19:15                           ` João Távora
2021-03-28 19:36                             ` Stefan Monnier
2021-03-28 19:37                         ` Stefan Monnier
2021-03-28 19:39                         ` Stefan Monnier
2021-03-26 19:52 ` bug#47388: (no subject) QuietApe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wntrdsmc.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=47388-done@debbugs.gnu.org \
    --cc=alex.branham@gmail.com \
    --cc=contovob@tcd.ie \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).