aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2020-03-12 11:18:07 -0400
committerStefan Monnier2020-03-12 11:18:07 -0400
commit2d221c8d87185fd02a6eb7558ddc4c9524153d72 (patch)
tree958a2cff753ee02e2004c1415fb58d5e009daba3
parentf253ff7b780c68bd4d1d12a978a1215af1971320 (diff)
downloademacs-2d221c8d87185fd02a6eb7558ddc4c9524153d72.tar.gz
emacs-2d221c8d87185fd02a6eb7558ddc4c9524153d72.zip
* lisp/emacs-lisp/eldoc.el (eldoc--supported-p): Understand the "old" API
-rw-r--r--lisp/emacs-lisp/eldoc.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 6e35018b100..660fce4be0b 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -404,7 +404,16 @@ effect."
404(defun eldoc--supported-p () 404(defun eldoc--supported-p ()
405 "Non-nil if an ElDoc function is set for this buffer." 405 "Non-nil if an ElDoc function is set for this buffer."
406 (and (not (memq eldoc-documentation-function '(nil ignore))) 406 (and (not (memq eldoc-documentation-function '(nil ignore)))
407 eldoc-documentation-functions)) 407 (or eldoc-documentation-functions
408 ;; The old API had major modes set `eldoc-documentation-function'
409 ;; to provide eldoc support. It's impossible now to determine
410 ;; reliably whether the `eldoc-documentation-function' provides
411 ;; eldoc support (as in the old API) or whether it just provides
412 ;; a way to combine the results of the
413 ;; `eldoc-documentation-functions' (as in the new API).
414 ;; But at least if it's set buffer-locally it's a good hint that
415 ;; there's some eldoc support in the current buffer.
416 (local-variable-p 'eldoc-documentation-function))))
408 417
409(defun eldoc-print-current-symbol-info () 418(defun eldoc-print-current-symbol-info ()
410 "Print the text produced by `eldoc-documentation-function'." 419 "Print the text produced by `eldoc-documentation-function'."