summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŠtěpán Němec <stepnem@gmail.com>2020-03-04 08:24:13 +0100
committerKyle Meyer <kyle@kyleam.com>2020-03-04 22:43:39 -0500
commit7454d201895f1b52e04c7a406fde211f4b00e878 (patch)
treee969dc8e3cb5cd5376d116ac0d7cdae13adf02c5
parentf360f9ec5896f805236539b9271fcec74b2b9d33 (diff)
downloadorg-mode-7454d201895f1b52e04c7a406fde211f4b00e878.tar.gz
org-eldoc: Use eldoc-documentation-functions when available
This reflects recent changes in GNU Emacs master branch: 2020-02-25T17:53:04-05:00!mvoteiza@udel.edu c0fcbd2c11 (Expose ElDoc functions in a hook (Bug#28257)) * lisp/org-eldoc.el (org-eldoc-load): Use 'eldoc-documentation-functions' when available.
-rw-r--r--contrib/lisp/org-eldoc.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
index b4fc0c8..72b10a1 100644
--- a/contrib/lisp/org-eldoc.el
+++ b/contrib/lisp/org-eldoc.el
@@ -161,7 +161,11 @@
(defun org-eldoc-load ()
"Set up org-eldoc documentation function."
(interactive)
- (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)
+ (setq-local eldoc-documentation-function
+ #'org-eldoc-documentation-function)))
;;;###autoload
(add-hook 'org-mode-hook #'org-eldoc-load)