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

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>   (when (function-equal #'ignore eldoc-documentation-function)
>>         (setq-local eldoc-documentation-function #'eldoc-documentation-default|compose|whatever))))
>
> BTW, using code like the one above is tolerable, usually for historical
> reasons, but new APIs should aim not to need such things: comparing
> functions is fundamentally always a hack.

So is run-time version checking, the risk is mostly the same.  But sure,
it's way uglier.  It's what needs to be done, as long as the package
developer want to support these features on a "as soon as possible"
basis _without_ adding the Eldoc core package as dependency.

But a simple version check on (< emacs-major-version 28) with two simple
branches works fine as well.

(if (< emacs-major-version 28)
    (the-before-until-thingy)
  (the-modern-thingy-but-no-comparing-functions))

Anyway, have you given thought to the possibility of having Eldoc.el
clobber the default value of eldoc-documentation-function if it finds it
unchanged?  This would just fix the case of Emacs < 28 && new eldoc for
developers who don't want to write the above snippet.  Not sure if it's
worth it, but Alex's original request goes in this direction.

Note that that all this mess has to do with the silliness that is having
eldoc.el be preloaded just becuase elisp-mode.el.  How would we go about
fixing that?

João





  reply	other threads:[~2021-03-28 18:56 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
2021-03-28 16:37                     ` Stefan Monnier
2021-03-28 18:56                       ` João Távora [this message]
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

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

  git send-email \
    --in-reply-to=87r1jzds4y.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=47388@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.