Browse Source

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.
Štěpán Němec 5 years ago
parent
commit
7454d20189
1 changed files with 5 additions and 1 deletions
  1. 5 1
      contrib/lisp/org-eldoc.el

+ 5 - 1
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)