Kyle Meyer <k...@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