Commit 0a3e46de authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(eldoc-mode): Doc fix.

Renamed from eldoc-print-current-symbol-info-function.  Calls changed.
parent 2c705f25
......@@ -139,16 +139,11 @@ truncated to make more of the arglist or documentation string visible."
(define-minor-mode eldoc-mode
"Toggle ElDoc mode on or off.
Show the defined parameters for the elisp function near point.
For the emacs lisp function at the beginning of the sexp which point is
within, show the defined parameters for the function in the echo area.
This information is extracted directly from the function or macro if it is
in pure lisp. If the emacs function is a subr, the parameters are obtained
from the documentation string if possible.
If point is over a documented variable, print that variable's docstring
In ElDoc mode, the echo area displays information about a
function or variable in the text where point is. If point is
on a documented variable, it displays that variable's doc string.
Otherwise it displays the argument list of the function called
in the expression point is on.
With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
:group 'eldoc :lighter eldoc-minor-mode-string
......@@ -167,7 +162,6 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
(eldoc-mode 1))
;; Idle timers are part of Emacs 19.31 and later.
(defun eldoc-schedule-timer ()
(or (and eldoc-timer
(memq eldoc-timer timer-idle-list))
......@@ -235,7 +229,7 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
(not (eq (selected-window) (minibuffer-window)))))
(defvar eldoc-print-current-symbol-info-function nil
(defvar eldoc-documentation-function nil
"If non-nil, 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.
......@@ -249,8 +243,8 @@ Emacs Lisp mode) that support Eldoc.")
(defun eldoc-print-current-symbol-info ()
(condition-case err
(and (eldoc-display-message-p)
(if eldoc-print-current-symbol-info-function
(eldoc-message (funcall eldoc-print-current-symbol-info-function))
(if eldoc-documentation-function
(eldoc-message (funcall eldoc-documentation-function))
(let* ((current-symbol (eldoc-current-symbol))
(current-fnsym (eldoc-fnsym-in-current-sexp))
(doc (cond
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment