aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/timer.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/timer.el')
-rw-r--r--lisp/timer.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/timer.el b/lisp/timer.el
index c069e13159e..7b1d570c548 100644
--- a/lisp/timer.el
+++ b/lisp/timer.el
@@ -40,6 +40,17 @@
40 ;; rescheduling or people who otherwise expect to use the process frequently 40 ;; rescheduling or people who otherwise expect to use the process frequently
41 "If non-nil, don't exit the timer process when no more events are pending.") 41 "If non-nil, don't exit the timer process when no more events are pending.")
42 42
43;; This should not be necessary, but on some systems, we get
44;; unkillable processes without this.
45;; It may be a kernel bug, but that's not certain.
46(defun timer-kill-emacs-hook ()
47 (if timer-process
48 (progn
49 (set-process-sentinel timer-process nil)
50 (set-process-filter timer-process nil)
51 (delete-process timer-process))))
52(add-hook 'kill-emacs-hook 'timer-kill-emacs-hook)
53
43;;;###autoload 54;;;###autoload
44(defun run-at-time (time repeat function &rest args) 55(defun run-at-time (time repeat function &rest args)
45 "Run a function at a time, and optionally on a regular interval. 56 "Run a function at a time, and optionally on a regular interval.