/[emacs]/emacs/lisp/emacs-lisp/eldoc.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/eldoc.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by schwab, Sat Dec 2 20:10:49 2000 UTC revision 1.19 by monnier, Fri Nov 16 23:58:48 2001 UTC
# Line 59  Line 59 
59    :group 'lisp    :group 'lisp
60    :group 'extensions)    :group 'extensions)
61    
 ;;;###autoload  
 (defcustom eldoc-mode nil  
   "*If non-nil, 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.  
   
 This variable is buffer-local."  
   :type 'boolean  
   :group 'eldoc)  
 (make-variable-buffer-local 'eldoc-mode)  
   
62  (defcustom eldoc-idle-delay 0.50  (defcustom eldoc-idle-delay 0.50
63    "*Number of seconds of idle time to wait before printing.    "*Number of seconds of idle time to wait before printing.
64  If user input arrives before this interval of time has elapsed after the  If user input arrives before this interval of time has elapsed after the
# Line 168  Non-nil values for this variable have no Line 150  Non-nil values for this variable have no
150  ;; This is used to determine if eldoc-idle-delay is changed by the user.  ;; This is used to determine if eldoc-idle-delay is changed by the user.
151  (defvar eldoc-current-idle-delay eldoc-idle-delay)  (defvar eldoc-current-idle-delay eldoc-idle-delay)
152    
 ;; Put minor mode string on the global minor-mode-alist.  
 ;;;###autoload  
 (cond ((fboundp 'add-minor-mode)  
        (add-minor-mode 'eldoc-mode 'eldoc-minor-mode-string))  
       ((assq 'eldoc-mode (default-value 'minor-mode-alist)))  
       (t  
        (setq-default minor-mode-alist  
                      (append (default-value 'minor-mode-alist)  
                              '((eldoc-mode eldoc-minor-mode-string))))))  
   
153    
154  ;;;###autoload  ;;;###autoload
155  (defun eldoc-mode (&optional prefix)  (define-minor-mode eldoc-mode
156    "*Enable or disable eldoc mode.    "Toggle ElDoc mode on or off.
157  See documentation for the variable of the same name for more details.  Show the defined parameters for the elisp function near point.
158    
159  If called interactively with no prefix argument, toggle current condition  For the emacs lisp function at the beginning of the sexp which point is
160  of the mode.  within, show the defined parameters for the function in the echo area.
161  If called with a positive or negative prefix argument, enable or disable  This information is extracted directly from the function or macro if it is
162  the mode, respectively."  in pure lisp.  If the emacs function is a subr, the parameters are obtained
163    (interactive "P")  from the documentation string if possible.
164    
165    If point is over a documented variable, print that variable's docstring
166    instead.
167    
168    With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
169      nil eldoc-minor-mode-string nil
170    (setq eldoc-last-message nil)    (setq eldoc-last-message nil)
171    (cond (eldoc-use-idle-timer-p    (cond (eldoc-use-idle-timer-p
172           (add-hook 'post-command-hook 'eldoc-schedule-timer)           (add-hook 'post-command-hook 'eldoc-schedule-timer)
# Line 205  the mode, respectively." Line 183  the mode, respectively."
183           ;; quick and dirty hack for seeing if this is XEmacs           ;; quick and dirty hack for seeing if this is XEmacs
184           (and (fboundp 'display-message)           (and (fboundp 'display-message)
185                (add-hook 'pre-command-hook                (add-hook 'pre-command-hook
186                          'eldoc-pre-command-refresh-echo-area t t))))                          'eldoc-pre-command-refresh-echo-area t t)))))
   (setq eldoc-mode (if prefix  
                        (>= (prefix-numeric-value prefix) 0)  
                      (not eldoc-mode)))  
   (and (interactive-p)  
        (if eldoc-mode  
            (message "eldoc-mode is enabled")  
          (message "eldoc-mode is disabled")))  
   eldoc-mode)  
187    
188  ;;;###autoload  ;;;###autoload
189  (defun turn-on-eldoc-mode ()  (defun turn-on-eldoc-mode ()

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26