aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-24 18:50:03 +0000
committerRichard M. Stallman1994-06-24 18:50:03 +0000
commitb2e609ff8c45986882b75a17df4f1cff760b0065 (patch)
treef690c1b503e98c40f5cdafae38a0a1b222b62245
parentd246db946d162d0b47077d30c99a5f38ce443761 (diff)
downloademacs-b2e609ff8c45986882b75a17df4f1cff760b0065.tar.gz
emacs-b2e609ff8c45986882b75a17df4f1cff760b0065.zip
(run-at-time): If REPEAT is 0, don't repeat.
-rw-r--r--lisp/timer.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/timer.el b/lisp/timer.el
index f4777daf90f..953b8f6f523 100644
--- a/lisp/timer.el
+++ b/lisp/timer.el
@@ -58,7 +58,7 @@ Arguments are TIME, REPEAT, FUNCTION &rest ARGS.
58TIME, a string, can be specified absolutely or relative to now. 58TIME, a string, can be specified absolutely or relative to now.
59TIME can also be an integer, a number of seconds. 59TIME can also be an integer, a number of seconds.
60REPEAT, an integer number of seconds, is the interval on which to repeat 60REPEAT, an integer number of seconds, is the interval on which to repeat
61the call to the function. If REPEAT is nil, call it just once. 61the call to the function. If REPEAT is nil or 0, call it just once.
62 62
63Absolute times may be specified in a wide variety of formats; 63Absolute times may be specified in a wide variety of formats;
64Something of the form `HOUR:MIN:SEC TIMEZONE MONTH/DAY/YEAR', where 64Something of the form `HOUR:MIN:SEC TIMEZONE MONTH/DAY/YEAR', where
@@ -72,6 +72,8 @@ Relative times may be specified as a series of numbers followed by units:
72 1 min 2 sec 3 hour 4 day 5 week 6 fortnight 7 month 8 year 72 1 min 2 sec 3 hour 4 day 5 week 6 fortnight 7 month 8 year
73 denotes the sum of all the given durations from now." 73 denotes the sum of all the given durations from now."
74 (interactive "sRun at time: \nNRepeat interval: \naFunction: ") 74 (interactive "sRun at time: \nNRepeat interval: \naFunction: ")
75 (if (equal repeat 0)
76 (setq repeat nil))
75 ;; Make TIME a string. 77 ;; Make TIME a string.
76 (if (integerp time) 78 (if (integerp time)
77 (setq time (format "%d sec" time))) 79 (setq time (format "%d sec" time)))