diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-12-10 21:56:33 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-12-10 21:56:33 -0500 |
commit | 964f16e1686899b7796045b10ffdb3c9b97a8153 (patch) | |
tree | a9474baa3ab44c7e2bd41e4243f89981ec8cda21 /lisp/emacs-lisp/eldoc.el | |
parent | 7b244600872bda831a2d80c4797b8fb13b73197c (diff) |
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Change default.
(eldoc-mode, eldoc-schedule-timer): Adjust to new default.
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r-- | lisp/emacs-lisp/eldoc.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 6dddf5b9a4..2ee3d23714 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -79,8 +79,8 @@ This has two preferred values: `upcase' or `downcase'. Actually, any name of a function which takes a string as an argument and returns another string is acceptable. -Note that if `eldoc-documentation-function' is non-nil, this variable -has no effect, unless the function handles it explicitly." +Note that this variable has no effect, unless +`eldoc-documentation-function' handles it explicitly." :type '(radio (function-item upcase) (function-item downcase) function) @@ -102,8 +102,8 @@ If value is nil, messages are always truncated to fit in a single line of display in the echo area. Function or variable symbol name may be truncated to make more of the arglist or documentation string visible. -Note that if `eldoc-documentation-function' is non-nil, this variable -has no effect, unless the function handles it explicitly." +Note that this variable has no effect, unless +`eldoc-documentation-function' handles it explicitly." :type '(radio (const :tag "Always" t) (const :tag "Never" nil) (const :tag "Yes, but truncate symbol names if it will\ @@ -186,7 +186,7 @@ expression point is on." :group 'eldoc :lighter eldoc-minor-mode-string (setq eldoc-last-message nil) (cond - ((not eldoc-documentation-function) + ((memq eldoc-documentation-function '(nil ignore)) (message "There is no ElDoc support in this buffer") (setq eldoc-mode nil)) (eldoc-mode @@ -225,7 +225,9 @@ expression point is on." eldoc-idle-delay t (lambda () (when (or eldoc-mode - (and global-eldoc-mode eldoc-documentation-function)) + (and global-eldoc-mode + (not (memq eldoc-documentation-function + '(nil ignore))))) (eldoc-print-current-symbol-info)))))) ;; If user has changed the idle delay, update the timer. @@ -321,7 +323,7 @@ Otherwise work like `message'." ;;;###autoload -(defvar eldoc-documentation-function nil +(defvar eldoc-documentation-function #'ignore "Function to call to return doc string. The function of no args should return a one-line string for displaying doc about a function etc. appropriate to the context around point. |