From 47f26b1e76ef9cd9a316d0195a858579d7c5c68b Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Thu, 13 Aug 2020 14:20:05 -0400 Subject: [PATCH] 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 Added Emacs<25 branch. --- contrib/lisp/org-eldoc.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el index aa1dcb41b..3b0999340 100644 --- a/contrib/lisp/org-eldoc.el +++ b/contrib/lisp/org-eldoc.el @@ -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)