summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eldoc.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-10-09 20:00:17 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-10-09 20:00:17 +0000
commit0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2 (patch)
tree3e8596405b243531128cd0f1d8f59d2ab9e7f7c7 /lisp/emacs-lisp/eldoc.el
parenta3c07f683d1f9fbf7c7af0120dfebc5fc34b61fa (diff)
parent20ef86730cca82a1a2e212a665c0b119ed2d70b2 (diff)
downloademacs-0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2.tar.gz
emacs-0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2.tar.bz2
emacs-0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2.zip
Merged from miles@gnu.org--gnu-2005 (patch 118-132, 551-577)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-551 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-552 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-553 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-554 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-555 Remove CVS keywords from newsticker files * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-556 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-557 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-558 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-559 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-560 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-561 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-562 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-563 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-565 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-567 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-568 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-569 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-570 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-571 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-572 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-573 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-574 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-575 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-576 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-577 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-118 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-119 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-120 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-121 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-122 Update from CVS: lisp/mm-url.el (mm-url-decode-entities): Fix regexp. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-123 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-124 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-125 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-126 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-127 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-128 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-129 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-130 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-131 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-132 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-423
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r--lisp/emacs-lisp/eldoc.el109
1 files changed, 44 insertions, 65 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 4ae8f53a981..7712ab5af1c 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -103,37 +103,37 @@ truncated to make more of the arglist or documentation string visible."
;;; No user options below here.
-;; Commands after which it is appropriate to print in the echo area.
-;; Eldoc does not try to print function arglists, etc. after just any command,
-;; because some commands print their own messages in the echo area and these
-;; functions would instantly overwrite them. But self-insert-command as well
-;; as most motion commands are good candidates.
-;; This variable contains an obarray of symbols; do not manipulate it
-;; directly. Instead, use `eldoc-add-command' and `eldoc-remove-command'.
-(defvar eldoc-message-commands nil)
-
-;; This is used by eldoc-add-command to initialize eldoc-message-commands
-;; as an obarray.
-;; It should probably never be necessary to do so, but if you
-;; choose to increase the number of buckets, you must do so before loading
-;; this file since the obarray is initialized at load time.
-;; Remember to keep it a prime number to improve hash performance.
-(defvar eldoc-message-commands-table-size 31)
-
-;; Bookkeeping; elements are as follows:
-;; 0 - contains the last symbol read from the buffer.
-;; 1 - contains the string last displayed in the echo area for that
-;; symbol, so it can be printed again if necessary without reconsing.
-;; 2 - 'function if function args, 'variable if variable documentation.
-(defvar eldoc-last-data (make-vector 3 nil))
+(defvar eldoc-message-commands-table-size 31
+ "This is used by eldoc-add-command to initialize eldoc-message-commands
+as an obarray.
+It should probably never be necessary to do so, but if you
+choose to increase the number of buckets, you must do so before loading
+this file since the obarray is initialized at load time.
+Remember to keep it a prime number to improve hash performance.")
+
+(defconst eldoc-message-commands
+ (make-vector eldoc-message-commands-table-size 0)
+ "Commands after which it is appropriate to print in the echo area.
+Eldoc does not try to print function arglists, etc. after just any command,
+because some commands print their own messages in the echo area and these
+functions would instantly overwrite them. But self-insert-command as well
+as most motion commands are good candidates.
+This variable contains an obarray of symbols; do not manipulate it
+directly. Instead, use `eldoc-add-command' and `eldoc-remove-command'.")
+
+(defconst eldoc-last-data (make-vector 3 nil)
+ "Bookkeeping; elements are as follows:
+ 0 - contains the last symbol read from the buffer.
+ 1 - contains the string last displayed in the echo area for that
+ symbol, so it can be printed again if necessary without reconsing.
+ 2 - 'function if function args, 'variable if variable documentation.")
(defvar eldoc-last-message nil)
-;; eldoc's timer object.
-(defvar eldoc-timer nil)
+(defvar eldoc-timer nil "eldoc's timer object.")
-;; idle time delay currently in use by timer.
-;; This is used to determine if eldoc-idle-delay is changed by the user.
-(defvar eldoc-current-idle-delay eldoc-idle-delay)
+(defvar eldoc-current-idle-delay eldoc-idle-delay
+ "idle time delay currently in use by timer.
+This is used to determine if `eldoc-idle-delay' is changed by the user.")
;;;###autoload
@@ -408,53 +408,32 @@ Emacs Lisp mode) that support Eldoc.")
;; These functions do display-command table management.
(defun eldoc-add-command (&rest cmds)
- (or eldoc-message-commands
- (setq eldoc-message-commands
- (make-vector eldoc-message-commands-table-size 0)))
-
- (let (name sym)
- (while cmds
- (setq name (car cmds))
- (setq cmds (cdr cmds))
-
- (cond ((symbolp name)
- (setq sym name)
- (setq name (symbol-name sym)))
- ((stringp name)
- (setq sym (intern-soft name))))
-
- (and (symbolp sym)
- (fboundp sym)
- (set (intern name eldoc-message-commands) t)))))
+ (dolist (name cmds)
+ (and (symbolp name)
+ (setq name (symbol-name name)))
+ (set (intern name eldoc-message-commands) t)))
(defun eldoc-add-command-completions (&rest names)
- (while names
- (apply 'eldoc-add-command
- (all-completions (car names) obarray 'fboundp))
- (setq names (cdr names))))
+ (dolist (name names)
+ (apply 'eldoc-add-command (all-completions name obarray 'commandp))))
(defun eldoc-remove-command (&rest cmds)
- (let (name)
- (while cmds
- (setq name (car cmds))
- (setq cmds (cdr cmds))
-
- (and (symbolp name)
- (setq name (symbol-name name)))
-
- (unintern name eldoc-message-commands))))
+ (dolist (name cmds)
+ (and (symbolp name)
+ (setq name (symbol-name name)))
+ (unintern name eldoc-message-commands)))
(defun eldoc-remove-command-completions (&rest names)
- (while names
+ (dolist (name names)
(apply 'eldoc-remove-command
- (all-completions (car names) eldoc-message-commands))
- (setq names (cdr names))))
+ (all-completions name eldoc-message-commands))))
;; Prime the command list.
(eldoc-add-command-completions
- "backward-" "beginning-of-" "delete-other-windows" "delete-window"
- "end-of-" "exchange-point-and-mark" "forward-"
+ "backward-" "beginning-of-" "move-beginning-of-" "delete-other-windows"
+ "delete-window"
+ "end-of-" "move-end-of-" "exchange-point-and-mark" "forward-"
"indent-for-tab-command" "goto-" "mark-page" "mark-paragraph"
"mouse-set-point" "move-" "pop-global-mark" "next-" "other-window"
"previous-" "recenter" "scroll-" "self-insert-command"
@@ -462,5 +441,5 @@ Emacs Lisp mode) that support Eldoc.")
(provide 'eldoc)
-;;; arch-tag: c9a58f9d-2055-46c1-9b82-7248b71a8375
+;; arch-tag: c9a58f9d-2055-46c1-9b82-7248b71a8375
;;; eldoc.el ends here