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.
This commit is contained in:
Štěpán Němec 2020-03-04 08:24:13 +01:00 committed by Kyle Meyer
parent f360f9ec58
commit 7454d20189
1 changed files with 5 additions and 1 deletions

View File

@ -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)