[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] org-eldoc: Fix compatibility with Emacs 28
From: |
Basil L. Contovounesios |
Subject: |
Re: [PATCH] org-eldoc: Fix compatibility with Emacs 28 |
Date: |
Fri, 17 Jul 2020 11:12:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Kyle Meyer <kyle@kyleam.com> writes:
> All right, thanks. Here's that in patch form. I briefly tested with
> Emacs 26, 27, and 28, and things seemed to work fine (though I'm not an
> org-eldoc user).
I'm not either, but it seems to get pulled in automatically when
org-plus-contrib is installed - that's how I noticed the errors in Org
buffers.
[...]
> @@ -161,11 +161,17 @@ (defun org-eldoc-documentation-function ()
> (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)))
> + ;; This approach is taken from python.el.
> + (with-no-warnings
> + (if (null eldoc-documentation-function)
> + ;; Emacs<25
> + (setq-local eldoc-documentation-function
> + #'org-eldoc-documentation-function)
> + (if (boundp 'eldoc-documentation-functions)
> + (add-hook 'eldoc-documentation-functions
> + #'org-eldoc-documentation-function nil t)
> + (add-function :before-until (local 'eldoc-documentation-function)
> + #'org-eldoc-documentation-function)))))
LGTM. My only aesthetic nit would be to replace the nested if with a
flat cond, but that's entirely up to you.
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, Nicolas Goaziou, 2020/07/13
- Re: [PATCH] Make org-eldoc work with Emacs 28, Basil L. Contovounesios, 2020/07/15
- 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 <=
- 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