summaryrefslogtreecommitdiff
path: root/lisp/=timer.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-06-24 18:50:03 +0000
committerRichard M. Stallman <rms@gnu.org>1994-06-24 18:50:03 +0000
commit00642a751d8b4384580048217ea1e31aeb4dc9bb (patch)
treeb26e29fab181992691ddf3188cf1b7c215573991 /lisp/=timer.el
parent0004427a96a8e2aa62526f0784852f147f358af3 (diff)
downloademacs-00642a751d8b4384580048217ea1e31aeb4dc9bb.tar.gz
(run-at-time): If REPEAT is 0, don't repeat.
Diffstat (limited to 'lisp/=timer.el')
-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.
TIME, a string, can be specified absolutely or relative to now.
TIME can also be an integer, a number of seconds.
REPEAT, an integer number of seconds, is the interval on which to repeat
-the call to the function. If REPEAT is nil, call it just once.
+the call to the function. If REPEAT is nil or 0, call it just once.
Absolute times may be specified in a wide variety of formats;
Something 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:
1 min 2 sec 3 hour 4 day 5 week 6 fortnight 7 month 8 year
denotes the sum of all the given durations from now."
(interactive "sRun at time: \nNRepeat interval: \naFunction: ")
+ (if (equal repeat 0)
+ (setq repeat nil))
;; Make TIME a string.
(if (integerp time)
(setq time (format "%d sec" time)))