/[emacs]/emacs/lisp/type-break.el
ViewVC logotype

Diff of /emacs/lisp/type-break.el

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

revision 1.28.4.2 by miles, Mon Jun 28 07:28:47 2004 UTC revision 1.28.4.3 by miles, Thu Nov 4 08:55:36 2004 UTC
# Line 1005  FRAC should be the inverse of the fracti Line 1005  FRAC should be the inverse of the fracti
1005      (setcar type-break-keystroke-threshold lower)      (setcar type-break-keystroke-threshold lower)
1006      (setcdr type-break-keystroke-threshold upper)      (setcdr type-break-keystroke-threshold upper)
1007      (if (interactive-p)      (if (interactive-p)
1008          (message "min threshold: %d\tmax threshold: %d" lower upper)          (message "min threshold: %d\tmax threshold: %d" lower upper))
1009        type-break-keystroke-threshold)))      type-break-keystroke-threshold))
1010    
1011    
1012  ;;; misc functions  ;;; misc functions
# Line 1103  With optional non-nil ALL, force redispl Line 1103  With optional non-nil ALL, force redispl
1103    
1104  (defun type-break-run-at-time (time repeat function)  (defun type-break-run-at-time (time repeat function)
1105    (condition-case nil (or (require 'timer) (require 'itimer)) (error nil))    (condition-case nil (or (require 'timer) (require 'itimer)) (error nil))
1106    (cond ((fboundp 'run-at-time)    (run-at-time time repeat function))
          (run-at-time time repeat function))  
         ((fboundp 'start-timer)  
          (let ((name (if (symbolp function)  
                          (symbol-name function)  
                        "type-break")))  
            (start-timer name function time repeat)))  
         ((fboundp 'start-itimer)  
          (let ((name (if (symbolp function)  
                          (symbol-name function)  
                        "type-break")))  
            (start-itimer name function time repeat)))))  
1107    
1108  (defvar timer-dont-exit)  (defvar timer-dont-exit)
1109  (defun type-break-cancel-function-timers (function)  (defun type-break-cancel-function-timers (function)
1110    (cond ((fboundp 'cancel-function-timers)    (let ((timer-dont-exit t))
1111           (let ((timer-dont-exit t))      (cancel-function-timers function)))
            (cancel-function-timers function)))  
         ((fboundp 'delete-timer)  
          (let ((list timer-list))  
            (while list  
              (and (eq (funcall 'timer-function (car list)) function)  
                   (delete-timer (car list)))  
              (setq list (cdr list)))))  
         ((fboundp 'delete-itimer)  
          (with-no-warnings  
           (let ((list itimer-list))  
             (while list  
               (and (eq (funcall 'itimer-function (car list)) function)  
                    (delete-itimer (car list)))  
               (setq list (cdr list))))))))  
1112    
1113    
1114  ;;; Demo wrappers  ;;; Demo wrappers

Legend:
Removed from v.1.28.4.2  
changed lines
  Added in v.1.28.4.3

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