diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-05-02 14:38:00 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-05-02 14:38:00 +0000 |
commit | 09a1444abb2494d0db3d71e4c942f5210786b619 (patch) | |
tree | 0fa0b9bb0d41ed6dea6cffc07681d931431704e7 /lisp/emacs-lisp/eldoc.el | |
parent | 030cd69ff13d95f439ca0d13a03215fc45959789 (diff) | |
parent | b21eabf6259ac5761aac04e68692384f2d23a5c3 (diff) | |
download | emacs-09a1444abb2494d0db3d71e4c942f5210786b619.tar.gz emacs-09a1444abb2494d0db3d71e4c942f5210786b619.tar.bz2 emacs-09a1444abb2494d0db3d71e4c942f5210786b619.zip |
Merged from miles@gnu.org--gnu-2005 (patch 281-285)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-281
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-282
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-283
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-284
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-285
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-336
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r-- | lisp/emacs-lisp/eldoc.el | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index f31dafb7b11..b23217151e3 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -45,7 +45,7 @@ ;; Major modes for other languages may use Eldoc by defining an ;; appropriate function as the buffer-local value of -;; `eldoc-print-current-symbol-info-function'. +;; `eldoc-documentation-function'. ;;; Code: @@ -139,16 +139,11 @@ truncated to make more of the arglist or documentation string visible." ;;;###autoload (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 -instead. +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 |