org-eldoc: (org-eldoc-documentation-function): set `eldoc-documentation-functions'

* contrib/lisp/org-eldoc.el (org-eldoc-documentation-function):
b2b587387 did not set eldoc-documentation-functions, resulting in
`eldoc--invoke-strategy' throwing a void-function error.

Modified-by: Kyle Meyer <kyle@kyleam.com>
  Added Emacs<25 branch.
This commit is contained in:
Nicholas Vollmer 2020-08-13 14:20:05 -04:00 committed by Kyle Meyer
parent ab9b14a80f
commit 47f26b1e76
1 changed files with 10 additions and 4 deletions

View File

@ -136,10 +136,16 @@
(let ((lang (org-eldoc-get-src-lang)))
(cond ((or
(string= lang "emacs-lisp")
(string= lang "elisp")) (if (fboundp 'elisp-eldoc-documentation-function)
(elisp-eldoc-documentation-function)
(let (eldoc-documentation-function)
(eldoc-print-current-symbol-info))))
(string= lang "elisp"))
(cond ((boundp 'eldoc-documentation-functions) ; Emacs>=28
(let ((eldoc-documentation-functions
'(elisp-eldoc-var-docstring elisp-eldoc-funcall)))
(eldoc-print-current-symbol-info)))
((fboundp 'elisp-eldoc-documentation-function)
(elisp-eldoc-documentation-function))
(t ; Emacs<25
(let (eldoc-documentation-function)
(eldoc-print-current-symbol-info)))))
((or
(string= lang "c") ;; http://github.com/nflath/c-eldoc
(string= lang "C")) (when (require 'c-eldoc nil t)