[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Make org-eldoc work with Emacs 28
From: |
Basil L. Contovounesios |
Subject: |
Re: [PATCH] Make org-eldoc work with Emacs 28 |
Date: |
Thu, 16 Jul 2020 02:20:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
"James N. V. Cash" <james.nvc@gmail.com> writes:
> This patch makes it continue to work by setting the new variable
> eldoc-documentation-strategy, which puts eldoc in
> "backwards-compatability" mode.
How involved would it be to make org-eldoc work in
non-"backwards-compatibility" mode?
> From 5c04048c0d1ed3f80c7dd3e6477e12fc8e760675 Mon Sep 17 00:00:00 2001
> From: "James N. V. Cash" <james.nvc@gmail.com>
> Date: Fri, 10 Jul 2020 11:56:23 -0400
> Subject: [PATCH] Make org-eldoc work with Emacs 28's new eldoc API
>
> Still using backward-compatability to use the old style of
> function. The new way is to make the documentation function take a
> callback, but this approach means the fewest changes.
> ---
> contrib/lisp/org-eldoc.el | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
> index 72b10a1fb..060674b24 100644
> --- a/contrib/lisp/org-eldoc.el
> +++ b/contrib/lisp/org-eldoc.el
> @@ -161,11 +161,15 @@
> (defun org-eldoc-load ()
> "Set up org-eldoc documentation function."
> (interactive)
> - (if (boundp 'eldoc-documentation-functions)
> - (add-hook 'eldoc-documentation-functions
> - #'org-eldoc-documentation-function nil t)
> - (setq-local eldoc-documentation-function
> - #'org-eldoc-documentation-function)))
> + (cond
> + ((boundp 'eldoc-documentation-strategy)
> + (setq-local eldoc-documentation-strategy
> + #'org-eldoc-documentation-function))
> + ((boundp 'eldoc-documentation-functions)
> + (add-hook 'eldoc-documentation-functions
> + #'org-eldoc-documentation-function nil t))
Both eldoc-documentation-strategy and eldoc-documentation-functions are
new in Emacs 28, so if one is defined, then so is the other.
More importantly, functions added to eldoc-documentation-functions must
take at least one argument, so org-eldoc-documentation-function is not a
suitable function in its current state.
> + (t (setq-local eldoc-documentation-function
> + #'org-eldoc-documentation-function))))
Thanks,
--
Basil
- [PATCH] Make org-eldoc work with Emacs 28, James N. V. Cash, 2020/07/12
- Re: [PATCH] Make org-eldoc work with Emacs 28,
Basil L. Contovounesios <=
- Re: [PATCH] Make org-eldoc work with Emacs 28, Kyle Meyer, 2020/07/16
- Re: [PATCH] Make org-eldoc work with Emacs 28, James N . V . Cash, 2020/07/16
- [PATCH] org-eldoc: Fix compatibility with Emacs 28, Kyle Meyer, 2020/07/17
- Re: [PATCH] org-eldoc: Fix compatibility with Emacs 28, Basil L. Contovounesios, 2020/07/17
- Re: [PATCH] org-eldoc: Fix compatibility with Emacs 28, Eric Abrahamsen, 2020/07/17
- Re: [PATCH] org-eldoc: Fix compatibility with Emacs 28, Kyle Meyer, 2020/07/17
- Re: [PATCH] org-eldoc: Fix compatibility with Emacs 28, Joseph Mingrone, 2020/07/17
- Re: [PATCH] org-eldoc: Fix compatibility with Emacs 28, Kyle Meyer, 2020/07/18