diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2023-08-08 04:53:08 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2023-08-08 04:53:08 +0200 |
commit | a579739e2b3f3c7218b14a7e41b78e7ddbded06c (patch) | |
tree | 7082f5cc920bed7e1843f08a4de44961eef66e8a /lisp/emacs-lisp | |
parent | 301e6a747acc31f9bcc5b7c2429dbcfa806d48f5 (diff) | |
download | emacs-a579739e2b3f3c7218b14a7e41b78e7ddbded06c.tar.gz emacs-a579739e2b3f3c7218b14a7e41b78e7ddbded06c.tar.bz2 emacs-a579739e2b3f3c7218b14a7e41b78e7ddbded06c.zip |
Make XEmacs compat aliases for timers obsolete
* lisp/emacs-lisp/timer.el (disable-timeout, add-timeout): Make
XEmacs compat aliases obsolete. Update all callers.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/timer.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 7544279d8aa..468c46519fd 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -1,6 +1,6 @@ ;;; timer.el --- run a function with args at some time in future -*- lexical-binding: t -*- -;; Copyright (C) 1996, 2001-2023 Free Software Foundation, Inc. +;; Copyright (C) 1996-2023 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Package: emacs @@ -226,8 +226,6 @@ the time of the current timer. That's because the activated timer will fire right away." (timer--activate timer (not dont-wait) reuse-cell 'idle)) -(defalias 'disable-timeout #'cancel-timer) - (defun cancel-timer (timer) "Remove TIMER from the list of active timers." (timer--check timer) @@ -348,7 +346,6 @@ This function is called, by name, directly by the C code." (memq timer timer-list)) (setf (timer--triggered timer) nil)))))) -;; This function is incompatible with the one in levents.el. (defun timeout-event-p (event) "Non-nil if EVENT is a timeout event." (and (listp event) (eq (car event) 'timer-event))) @@ -448,6 +445,7 @@ If REPEAT is non-nil, repeat the timer every REPEAT seconds. This function returns a timer object which you can use in `cancel-timer'. This function is for compatibility; see also `run-with-timer'." + (declare (obsolete run-with-timer "30.1")) (run-with-timer secs repeat function object)) (defun run-with-idle-timer (secs repeat function &rest args) @@ -580,6 +578,9 @@ If the user does not answer after SECONDS seconds, return DEFAULT-VALUE." (dolist (timer timer-idle-list) (if (timerp timer) ;; FIXME: Why test? (setf (timer--triggered timer) nil)))) + +(define-obsolete-function-alias 'disable-timeout #'cancel-timer "30.1") + (provide 'timer) |