Commit graph

19 commits

Author SHA1 Message Date
Stefan Monnier
95193cc5c4 (eldoc-mode): Use define-minor-mode. 2001-11-16 23:58:48 +00:00
Andreas Schwab
7cc35ed26d (eldoc): Don't make parent of itself. 2000-12-02 20:10:49 +00:00
Noah Friedman
03a9c6d06a (eldoc-minor-mode-string): Add autoload cookie; otherwise autoloaded
add-minor-mode call complains in Emacs 21.
Use add-minor-mode to set minor-mode-alist, if available.

(eldoc-echo-area-use-multiline-p): New user option.
(eldoc-echo-area-multiline-supported-p): New variable.
(eldoc-docstring-format-sym-doc): Use them.
(eldoc-mode): If not using idle timers, append to local post and
pre command hooks.  Suggested by David Byers <davby@ida.liu.se>.

(eldoc-display-message-no-interference-p): Don't interfere with edebug.
Add autoload cookie for eldoc-mode minor-mode-alist initialization.

(eldoc-function-arglist): New function.
(eldoc-function-argstring): Use it.
2000-07-24 00:38:34 +00:00
Andreas Schwab
0ba87ff4f3 (eldoc-argument-case): Fix customize type. 1998-10-30 10:59:23 +00:00
Noah Friedman
44faf98195 (eldoc-message): Check for 1-arg case, and store string in
eldoc-last-message without consing a new string.
Rearrange logic from nested if's into cond's.

(eldoc-print-fnsym-args): Renamed to eldoc-get-fnsym-args-string.
Do not print message; just return string.

(eldoc-get-var-docstring): Renamed from eldoc-print-var-docstring.
Do not print message; just return string.
Cache that string in eldoc-last-data.

(eldoc-last-data): Make into a vector.
(eldoc-get-fnsym-args-string): Use new data form of structure.
(eldoc-get-var-docstring): Here also.

(eldoc-last-data-store): New function.
(eldoc-get-fnsym-args-string): Use it.
(eldoc-get-var-docstring): Here also.

(eldoc-docstring-first-line): Minimize interim string consing.
Call substitute-command-keys on the result.

(eldoc-print-var-docstrings, eldoc-print-docstring,
eldoc-docstring-message): Functions removed.
(eldoc-docstring-format-sym-doc): New function, functionality ripped out of
eldoc-docstring-message.
(eldoc-get-fnsym-args-string, eldoc-get-var-docstring): Use it.
1998-09-19 02:15:26 +00:00
Noah Friedman
bc74e94e2b [top level]: Add up-list' and down-list' to eldoc-message-commands. 1997-07-09 12:44:15 +00:00
Noah Friedman
c128637667 (eldoc-message-commands): Move docstring into comments, since this isn't
a user variable.

(eldoc-message-commands-table-size, eldoc-use-idle-timer-p,
eldoc-function-argstring-from-docstring-method-table): Use defvar,
not defconst.

(eldoc-last-data): Use cons explicitly; don't rely on dotted pair read
syntax.  I'm worried the latter might get compiled as read-only data someday.

(eldoc-docstring-message): If truncating symbol name, show ending of name
rather than beginning.  The former is generally more unique.

(eldoc-function-argstring-from-docstring-method-table): Handle
pathological `save-restriction' case.

[top level]: Add `indent-for-tab-command' to eldoc-message-commands.
1997-05-22 06:47:41 +00:00
Richard M. Stallman
a326c090b5 Add defgroup; use defcustom for user vars. 1997-04-14 07:33:28 +00:00
Noah Friedman
387ccacecf (eldoc-idle-delay): Make defvar, not defconst.
(eldoc-minor-mode-string): Make defvar, not defconst.
(eldoc-argument-case): Make defvar, not defconst.
1997-03-27 10:44:56 +00:00
Noah Friedman
9d497c0123 (eldoc-message-commands): Doc fixes.
(eldoc-message): Make function, not macro.

(eldoc-last-message): New internal variable.
(eldoc-mode): Initialize it to nil.
(eldoc-message): Use it.
(eldoc-print-current-symbol-info): Use it.

(eldoc-pre-command-refresh-echo-area): New function.
(eldoc-mode): Put it on pre-command-hook if in XEmacs or using idle timers
in Emacs.

(eldoc-message-commands-table-size): New constant.
(eldoc-add-command): Use it to initialize eldoc-message-commands.

(eldoc-display-message-no-interference-p): New function.
(eldoc-display-message-p): Use it.

(eldoc-print-fnsym-args, eldoc-print-var-docstring): Arg sym no longer
optional.
Do not initialize arg if nil.

(eldoc-forward-sexp-safe): Function deleted.
(eldoc-beginning-of-sexp): New function.
(eldoc-fnsym-in-current-sexp): Use eldoc-beginning-of-sexp.
Use eldoc-current-symbol to get symbol at point.

(eldoc-function-argstring-from-docstring-method-table): Forge docstrings
for `and', `or', `list', `+', and `-'.

(eldoc-add-command-completions): New function.
(eldoc-add-command): Take list of args.
No longer interactive.

(eldoc-remove-command-completions): New function.
(eldoc-remove-command): Take list of args.
No longer interactive.

top level: Initialize eldoc-message-commands using
eldoc-add-command-completions.
1997-02-19 10:24:26 +00:00
Noah Friedman
4fa073648d (eldoc-display-message-p): New function.
Return nil if cursor-in-echo-area, or using idle timers and a command
is still active.

(eldoc-print-current-symbol-info): Use eldoc-display-message-p.
1997-02-04 18:21:29 +00:00
Noah Friedman
332ae8db49 Update copyright notice to reflect assignment to FSF and incorporation
into Emacs.

Attempt to load `timer'.

(eldoc-idle-delay): Make defconst.
(eldoc-minor-mode-string): Make defconst.
(eldoc-argument-case): Make defconst.

(eldoc-message-commands): Renamed from eldoc-mode-message-commands.
All callers changed.
Add `mouse-set-point' as a default candidate.

(eldoc-use-idle-timer-p): New constant.
(eldoc-timer): New variable.
(eldoc-current-idle-delay): New variable.
(eldoc-schedule-timer): New function.
(eldoc-mode): Use idle timers if supported.

(eldoc-add-command): Provide completion on interactive commands only, not
all bound functions.

(eldoc-print-current-symbol-info): Renamed from
eldoc-mode-print-current-symbol-info.  All callers changed.
Check whether using idle timers or being run from post-command hooks.
Use `executing-kbd-macro' instead of `executing-macro'.

(eldoc-print-fnsym-args): Don't make interactive.
Cache current symbol name in eldoc-last-data; it was forgetting to do this
previously.
If subr args cannot be determined, show single-line docstring for it instead.

(eldoc-docstring-message): New function.
(eldoc-print-docstring): New function.
(eldoc-print-var-docstring): Use them.

(eldoc-function-argstring-from-docstring-method-table): New constant.
(eldoc-function-argstring-from-docstring): Use it.
1997-02-03 06:13:34 +00:00
Noah Friedman
477c388f4b (eldoc-function-argstring-from-docstring): Add search that finds arglist
for `start-process'; possibly others.
1996-10-04 04:43:42 +00:00
Noah Friedman
58ee38cab8 (eldoc-mode): Toggle eldoc-mode if no prefix given. 1996-07-14 16:46:25 +00:00
Noah Friedman
72a9f8fd72 (eldoc-message): New macro.
(eldoc-print-var-docstring, eldoc-print-fnsym-args): Use it.
1995-11-25 03:45:25 +00:00
Noah Friedman
44154e3cf5 (eldoc-mode-print-current-symbol-info): Do nothing if executing-macro. 1995-11-21 15:21:34 +00:00
Noah Friedman
bd3e175925 (eldoc-minor-mode-string): New variable. 1995-11-18 22:32:07 +00:00
Noah Friedman
dd159a748e (top level): Make sure to set global minor-mode-alist, not local one.
(eldoc-mode-print-current-symbol-info): Make sure this-command is a symbol.
(eldoc-function-argstring): If fn is a macro, skip leading `macro' elt.
(eldoc-function-argstring-from-docstring): Look for `condition-case' pattern.
1995-11-13 01:37:40 +00:00
Noah Friedman
1b09702ac8 Initial revision 1995-11-12 21:04:08 +00:00