[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/eldoc.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/eldoc.el |
Date: |
Tue, 04 Oct 2005 17:49:10 -0400 |
Index: emacs/lisp/emacs-lisp/eldoc.el
diff -c emacs/lisp/emacs-lisp/eldoc.el:1.36 emacs/lisp/emacs-lisp/eldoc.el:1.37
*** emacs/lisp/emacs-lisp/eldoc.el:1.36 Fri Aug 12 11:21:54 2005
--- emacs/lisp/emacs-lisp/eldoc.el Tue Oct 4 21:49:09 2005
***************
*** 103,139 ****
;;; 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-last-message nil)
! ;; eldoc's timer object.
! (defvar eldoc-timer nil)
! ;; 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)
;;;###autoload
--- 103,139 ----
;;; No user options below here.
! (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)
! (defvar eldoc-timer nil "eldoc's timer object.")
! (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,460 ****
;; 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)))))
(defun eldoc-add-command-completions (&rest names)
! (while names
! (apply 'eldoc-add-command
! (all-completions (car names) obarray 'fboundp))
! (setq names (cdr names))))
(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))))
(defun eldoc-remove-command-completions (&rest names)
! (while names
(apply 'eldoc-remove-command
! (all-completions (car names) eldoc-message-commands))
! (setq names (cdr names))))
;; Prime the command list.
(eldoc-add-command-completions
! "backward-" "beginning-of-" "delete-other-windows" "delete-window"
! "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"
--- 408,439 ----
;; These functions do display-command table management.
(defun eldoc-add-command (&rest cmds)
! (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)
! (dolist (name names)
! (apply 'eldoc-add-command (all-completions name obarray 'commandp))))
(defun eldoc-remove-command (&rest cmds)
! (dolist (name cmds)
! (and (symbolp name)
! (setq name (symbol-name name)))
! (unintern name eldoc-message-commands)))
(defun eldoc-remove-command-completions (&rest names)
! (dolist (name names)
(apply 'eldoc-remove-command
! (all-completions name eldoc-message-commands))))
;; Prime the command list.
(eldoc-add-command-completions
! "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,466 ****
(provide 'eldoc)
! ;;; arch-tag: c9a58f9d-2055-46c1-9b82-7248b71a8375
;;; eldoc.el ends here
--- 441,445 ----
(provide 'eldoc)
! ;; arch-tag: c9a58f9d-2055-46c1-9b82-7248b71a8375
;;; eldoc.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/eldoc.el,
Stefan Monnier <=