summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Murphy <trevormurphy@google.com>2021-04-13 12:40:14 -0700
committerKyle Meyer <kyle@kyleam.com>2021-04-17 15:14:39 -0400
commit7e2eba8cc510c9a43e133ddbd2855981f65f69b4 (patch)
treec96b3dc3fe41ec782eaa8db9572dce609dc466d9
parentf12ca1a562ad81f28bef1a62aa01b0d069ee8488 (diff)
downloadorg-mode-7e2eba8cc510c9a43e133ddbd2855981f65f69b4.tar.gz
org-eldoc: Fix compatibility with eldoc 1.11 and Emacs 27
* 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
-rw-r--r--contrib/lisp/org-eldoc.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
index 78f595c..b9b4460 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)))