]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove compat code for XEmacs' itimer.el
authorStefan Kangas <stefankangas@gmail.com>
Sat, 12 Aug 2023 13:29:09 +0000 (15:29 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sat, 12 Aug 2023 13:46:17 +0000 (15:46 +0200)
* lisp/progmodes/idlwave.el (idlwave-update-routine-info)
(idlwave-start-load-rinfo-timer):
* lisp/type-break.el (type-break-cancel-function-timers)
(type-break-run-at-time): Remove XEmacs compat code.

lisp/progmodes/idlwave.el
lisp/type-break.el

index 488e6aa3d2d95229841db8e2450d5ceded597899..7bdaa6b1b6f21c5a54a89285f62f45159f8bca3b 100644 (file)
@@ -4311,10 +4311,7 @@ automatically when called interactively.  When you need routine
 information updated immediately, leave NO-CONCATENATE nil."
   (interactive "P\np")
   ;; Stop any idle processing
-  (if (or (and (fboundp 'itimerp)
-              (itimerp idlwave-load-rinfo-idle-timer))
-         (and (fboundp 'timerp)
-              (timerp idlwave-load-rinfo-idle-timer)))
+  (if (timerp idlwave-load-rinfo-idle-timer)
       (cancel-timer idlwave-load-rinfo-idle-timer))
   (cond
    ((equal arg '(64))
@@ -4388,10 +4385,7 @@ information updated immediately, leave NO-CONCATENATE nil."
 (defvar idlwave-load-rinfo-steps-done (make-vector 6 nil))
 (defvar idlwave-load-rinfo-idle-timer nil)
 (defun idlwave-start-load-rinfo-timer ()
-  (if (or (and (fboundp 'itimerp)
-              (itimerp idlwave-load-rinfo-idle-timer))
-         (and (fboundp 'timerp)
-              (timerp idlwave-load-rinfo-idle-timer)))
+  (if (timerp idlwave-load-rinfo-idle-timer)
       (cancel-timer idlwave-load-rinfo-idle-timer))
   (setq idlwave-load-rinfo-steps-done (make-vector 6 nil))
   (setq idlwave-load-rinfo-idle-timer nil)
index 1aa2b9d2997b79eff59be6ac8acce08af725c9d1..494ed80c4963eb2459bb319b752f54b62112a2ab 100644 (file)
@@ -584,13 +584,13 @@ INTERVAL is the full length of an interval (defaults to TIME)."
   (type-break-check-post-command-hook)
   (type-break-cancel-schedule)
   (type-break-time-warning-schedule time 'reset)
-  (type-break-run-at-time (max 1 time) nil 'type-break-alarm)
+  (run-at-time (max 1 time) nil 'type-break-alarm)
   (setq type-break-time-next-break
         (type-break-time-sum start (or interval time))))
 
 (defun type-break-cancel-schedule ()
   (type-break-cancel-time-warning-schedule)
-  (type-break-cancel-function-timers 'type-break-alarm)
+  (cancel-function-timers 'type-break-alarm)
   (setq type-break-alarm-p nil)
   (setq type-break-time-next-break nil))
 
@@ -621,7 +621,7 @@ INTERVAL is the full length of an interval (defaults to TIME)."
 
       ;(let (type-break-current-time-warning-interval)
       ;  (type-break-cancel-time-warning-schedule))
-      (type-break-run-at-time (max 1 time) nil 'type-break-time-warning-alarm)
+      (run-at-time (max 1 time) nil 'type-break-time-warning-alarm)
 
       (cond
        (resetp
@@ -631,7 +631,7 @@ INTERVAL is the full length of an interval (defaults to TIME)."
         (setq type-break-warning-countdown-string-type "seconds"))))))))
 
 (defun type-break-cancel-time-warning-schedule ()
-  (type-break-cancel-function-timers 'type-break-time-warning-alarm)
+  (cancel-function-timers 'type-break-time-warning-alarm)
   (remove-hook 'type-break-post-command-hook 'type-break-time-warning)
   (setq type-break-current-time-warning-interval
         type-break-time-warning-intervals)
@@ -983,21 +983,6 @@ With optional non-nil ALL, force redisplay of all mode-lines."
 (defun type-break-check-post-command-hook ()
   (add-hook 'post-command-hook 'type-break-run-tb-post-command-hook 'append))
 
-\f
-;;; Timer wrapper functions
-;;
-;; These shield type-break from variations in the interval timer packages
-;; for different versions of Emacs.
-
-(defun type-break-run-at-time (time repeat function)
-  (condition-case nil (or (require 'timer) (require 'itimer)) (error nil))
-  (run-at-time time repeat function))
-
-(defvar timer-dont-exit)
-(defun type-break-cancel-function-timers (function)
-  (let ((timer-dont-exit t))
-    (cancel-function-timers function)))
-
 \f
 ;;; Demo wrappers
 
@@ -1144,6 +1129,8 @@ With optional non-nil ALL, force redisplay of all mode-lines."
             (kill-buffer buffer-name))))))
 
 (define-obsolete-function-alias 'timep 'type-break-timep "29.1")
+(define-obsolete-function-alias 'type-break-run-at-time #'run-at-time "30.1")
+(define-obsolete-function-alias 'type-break-cancel-function-timers #'cancel-function-timers "30.1")
 
 \f
 (provide 'type-break)