emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] org-eldoc: Fix compatibility with eldoc 1.11 and Emacs 27


From: Trevor Murphy
Subject: [PATCH] org-eldoc: Fix compatibility with eldoc 1.11 and Emacs 27
Date: Tue, 13 Apr 2021 12:40:14 -0700

* contrib/lisp/org-eldoc.el (org-eldoc-documentation-function): Check
  before invoking elisp eldoc functions from Emacs 28.

The previous check assumed that the presence of eldoc 1.11 bindings
implied elisp-mode bindings that come with Emacs>=28, but eldoc 1.11
is available on GNU Elpa so the assumption doesn't always hold.

TINYCHANGE
---
 contrib/lisp/org-eldoc.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
index 7a6885160..550f857be 100644
--- a/contrib/lisp/org-eldoc.el
+++ b/contrib/lisp/org-eldoc.el
@@ -144,7 +144,9 @@
      (cond ((or
              (string= lang "emacs-lisp")
              (string= lang "elisp"))
-           (cond ((boundp 'eldoc-documentation-functions) ; Emacs>=28
+           (cond ((and (boundp 'eldoc-documentation-functions) ; Emacs>=28
+                       (fboundp 'elisp-eldoc-var-docstring)
+                       (fboundp 'elisp-eldoc-funcall))
                   (let ((eldoc-documentation-functions
                          '(elisp-eldoc-var-docstring elisp-eldoc-funcall)))
                     (eldoc-print-current-symbol-info)))
-- 
2.31.1.295.g9ea45b61b8-goog




reply via email to

[Prev in Thread] Current Thread [Next in Thread]