"James N. V. Cash" <james....@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....@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