diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-08-02 17:36:29 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-08-02 17:36:29 +0200 |
commit | e5095f0fd31764a729b4afebf8b5e868a09eef28 (patch) | |
tree | 9404b95851af889d2f3652db786bca6180394587 /lisp/emacs-lisp/eldoc.el | |
parent | 7a161dc688f0eeee64e307a55efbc7d11bab3627 (diff) | |
parent | 99d1a66646b7450ad0be3e4471341b50fee7bdb5 (diff) | |
download | emacs-e5095f0fd31764a729b4afebf8b5e868a09eef28.tar.gz emacs-e5095f0fd31764a729b4afebf8b5e868a09eef28.tar.bz2 emacs-e5095f0fd31764a729b4afebf8b5e868a09eef28.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r-- | lisp/emacs-lisp/eldoc.el | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index fcb104e5477..19b3bd78aea 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -5,7 +5,7 @@ ;; Author: Noah Friedman <friedman@splode.com> ;; Keywords: extensions ;; Created: 1995-10-06 -;; Version: 1.6.0 +;; Version: 1.8.0 ;; Package-Requires: ((emacs "26.3")) ;; This is a GNU ELPA :core package. Avoid functionality that is not @@ -229,11 +229,15 @@ expression point is on." :lighter eldoc-minor-mode-string (defun eldoc--eval-expression-setup () ;; Setup `eldoc', similar to `emacs-lisp-mode'. FIXME: Call ;; `emacs-lisp-mode' itself? - (add-hook 'eldoc-documentation-functions - #'elisp-eldoc-var-docstring nil t) - (add-hook 'eldoc-documentation-functions - #'elisp-eldoc-funcall nil t) - (setq eldoc-documentation-strategy 'eldoc-documentation-default) + (cond ((<= emacs-major-version 27) + (declare-function elisp-eldoc-documentation-function "elisp-mode") + (add-function :before-until (local 'eldoc-documentation-function) + #'elisp-eldoc-documentation-function)) + (t (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-var-docstring nil t) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-funcall nil t) + (setq eldoc-documentation-strategy 'eldoc-documentation-default))) (eldoc-mode +1)) ;;;###autoload @@ -346,6 +350,12 @@ Also store it in `eldoc-last-message' and return that value." "Compute information to store in `eldoc--last-request-state'." (list (current-buffer) (buffer-modified-tick) (point))) +(defun eldoc-display-message-p () + (eldoc--request-docs-p (eldoc--request-state))) +(make-obsolete 'eldoc-display-message-p + "Use `eldoc-documentation-functions' instead." + "eldoc-1.6.0") + (defun eldoc--request-docs-p (request-state) "Return non-nil when it is appropriate to request docs. REQUEST-STATE is a candidate for `eldoc--last-request-state'" |