diff options
| author | Richard M. Stallman | 2005-04-26 10:59:44 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-04-26 10:59:44 +0000 |
| commit | 0a3e46de17584a2bd6045895615d83f9127681f0 (patch) | |
| tree | 2d5c574df4db37f70b04f53203a36a030cfd0656 | |
| parent | 2c705f25481eb44b9eb33b414528f0f2856ffc99 (diff) | |
| download | emacs-0a3e46de17584a2bd6045895615d83f9127681f0.tar.gz emacs-0a3e46de17584a2bd6045895615d83f9127681f0.zip | |
(eldoc-mode): Doc fix.
(eldoc-documentation-function):
Renamed from eldoc-print-current-symbol-info-function. Calls changed.
| -rw-r--r-- | lisp/emacs-lisp/eldoc.el | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index f31dafb7b11..29167c70812 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -139,16 +139,11 @@ truncated to make more of the arglist or documentation string visible." | |||
| 139 | ;;;###autoload | 139 | ;;;###autoload |
| 140 | (define-minor-mode eldoc-mode | 140 | (define-minor-mode eldoc-mode |
| 141 | "Toggle ElDoc mode on or off. | 141 | "Toggle ElDoc mode on or off. |
| 142 | Show the defined parameters for the elisp function near point. | 142 | In ElDoc mode, the echo area displays information about a |
| 143 | 143 | function or variable in the text where point is. If point is | |
| 144 | For the emacs lisp function at the beginning of the sexp which point is | 144 | on a documented variable, it displays that variable's doc string. |
| 145 | within, show the defined parameters for the function in the echo area. | 145 | Otherwise it displays the argument list of the function called |
| 146 | This information is extracted directly from the function or macro if it is | 146 | in the expression point is on. |
| 147 | in pure lisp. If the emacs function is a subr, the parameters are obtained | ||
| 148 | from the documentation string if possible. | ||
| 149 | |||
| 150 | If point is over a documented variable, print that variable's docstring | ||
| 151 | instead. | ||
| 152 | 147 | ||
| 153 | With prefix ARG, turn ElDoc mode on if and only if ARG is positive." | 148 | With prefix ARG, turn ElDoc mode on if and only if ARG is positive." |
| 154 | :group 'eldoc :lighter eldoc-minor-mode-string | 149 | :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." | |||
| 167 | (eldoc-mode 1)) | 162 | (eldoc-mode 1)) |
| 168 | 163 | ||
| 169 | 164 | ||
| 170 | ;; Idle timers are part of Emacs 19.31 and later. | ||
| 171 | (defun eldoc-schedule-timer () | 165 | (defun eldoc-schedule-timer () |
| 172 | (or (and eldoc-timer | 166 | (or (and eldoc-timer |
| 173 | (memq eldoc-timer timer-idle-list)) | 167 | (memq eldoc-timer timer-idle-list)) |
| @@ -235,7 +229,7 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive." | |||
| 235 | (not (eq (selected-window) (minibuffer-window))))) | 229 | (not (eq (selected-window) (minibuffer-window))))) |
| 236 | 230 | ||
| 237 | 231 | ||
| 238 | (defvar eldoc-print-current-symbol-info-function nil | 232 | (defvar eldoc-documentation-function nil |
| 239 | "If non-nil, function to call to return doc string. | 233 | "If non-nil, function to call to return doc string. |
| 240 | The function of no args should return a one-line string for displaying | 234 | The function of no args should return a one-line string for displaying |
| 241 | doc about a function etc. appropriate to the context around point. | 235 | doc about a function etc. appropriate to the context around point. |
| @@ -249,8 +243,8 @@ Emacs Lisp mode) that support Eldoc.") | |||
| 249 | (defun eldoc-print-current-symbol-info () | 243 | (defun eldoc-print-current-symbol-info () |
| 250 | (condition-case err | 244 | (condition-case err |
| 251 | (and (eldoc-display-message-p) | 245 | (and (eldoc-display-message-p) |
| 252 | (if eldoc-print-current-symbol-info-function | 246 | (if eldoc-documentation-function |
| 253 | (eldoc-message (funcall eldoc-print-current-symbol-info-function)) | 247 | (eldoc-message (funcall eldoc-documentation-function)) |
| 254 | (let* ((current-symbol (eldoc-current-symbol)) | 248 | (let* ((current-symbol (eldoc-current-symbol)) |
| 255 | (current-fnsym (eldoc-fnsym-in-current-sexp)) | 249 | (current-fnsym (eldoc-fnsym-in-current-sexp)) |
| 256 | (doc (cond | 250 | (doc (cond |