[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc
From: |
João Távora |
Subject: |
bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc |
Date: |
Sun, 28 Mar 2021 15:50:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Alex Branham <alex.branham@gmail.com> writes:
> On Sat 27 Mar 2021 at 12:53, João Távora <joaotavora@gmail.com> wrote:
>
>> 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.
>
> Thanks! It sounds like the below is what you're suggesting modes do in
> order to support all the possible eldoc+Emacs versions, let me know if
> I've misunderstood.
>
> (if (not (boundp 'eldoc-documentation-functions))
> ;; old eldoc
> (add-function :before-until (local 'eldoc-documentation-function)
> #'ess-r-eldoc-function)
> ;; new eldoc
> (add-hook 'eldoc-documentation-functions #'ess-r-eldoc-function nil t)
> ;; new eldoc + Emacs 27.1
> (when (and (fboundp 'eldoc-documentation-default)
> (function-equal #'ignore eldoc-documentation-function))
> (setq-local eldoc-documentation-function
> #'eldoc-documentation-default)))
You don't need to be as complex as this:
(if (not (boundp 'eldoc-documentation-strategy))
(add-function :before-until (local 'eldoc-documentation-function)
#'ess-r-eldoc-function)
(add-hook 'eldoc-documentation-functions #'ess-r-eldoc-function nil t)
(when (function-equal #'ignore eldoc-documentation-function)
(setq-local eldoc-documentation-function
#'eldoc-documentation-default|compose|whatever))))
> 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.
João
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Alex Branham, 2021/03/25
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Basil L. Contovounesios, 2021/03/26
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, João Távora, 2021/03/26
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Alex Branham, 2021/03/26
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, João Távora, 2021/03/26
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Alex Branham, 2021/03/26
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, João Távora, 2021/03/26
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Alex Branham, 2021/03/27
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, João Távora, 2021/03/27
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Alex Branham, 2021/03/28
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc,
João Távora <=
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Alex Branham, 2021/03/28
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, João Távora, 2021/03/28
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Stefan Monnier, 2021/03/28
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, João Távora, 2021/03/28
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Stefan Monnier, 2021/03/28
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, João Távora, 2021/03/28
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Stefan Monnier, 2021/03/28
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Stefan Monnier, 2021/03/28
- bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc, Stefan Monnier, 2021/03/28
bug#47388: (no subject), QuietApe, 2021/03/26