emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 00a65e3: Improve documentation of 'run-at-time'


From: Eli Zaretskii
Subject: [Emacs-diffs] master 00a65e3: Improve documentation of 'run-at-time'
Date: Sun, 20 Sep 2015 06:35:44 +0000

branch: master
commit 00a65e3238a888fc92b0c2aab8cb5bda8bd99c29
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Improve documentation of 'run-at-time'
    
    * lisp/emacs-lisp/timer.el (run-at-time): Improve the doc string.
    In particular, don't refer to 'diary-entry-time', because it is
    unavailable until diary-lib is loaded.  Also, refer to
    'timer-duration-words', not 'timer-duration', as the latter's doc
    string says nothing about the accepted strings.
---
 lisp/emacs-lisp/timer.el |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index c80c496..2aca26c 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -345,22 +345,23 @@ This function is called, by name, directly by the C code."
 (defun run-at-time (time repeat function &rest args)
   "Perform an action at time TIME.
 Repeat the action every REPEAT seconds, if REPEAT is non-nil.
+REPEAT may be an integer or floating point number.
 TIME should be one of:
-- a string giving an absolute time like \"11:23pm\" (the
-  acceptable formats are those recognized by
-  `diary-entry-time'; note that such times are interpreted
-  as times today, even if in the past);
-- a string giving a relative time like \"2 hours 35 minutes\"
-  (the acceptable formats are those recognized by
-  `timer-duration');
-- nil meaning now;
+- a string giving today's time like \"11:23pm\"
+  (the acceptable formats are HHMM, H:MM, HH:MM, HHam, HHAM,
+  HHpm, HHPM, HH:MMam, HH:MMAM, HH:MMpm, or HH:MMPM;
+  a period '.' can be used instead of a colon ':' to separate
+  the hour and minute parts);
+- a string giving a relative time like \"90\" or \"2 hours 35 minutes\"
+  (the acceptable forms are a number of seconds without units
+  or some combination of values using units in `timer-duration-words');
+- nil, meaning now;
 - a number of seconds from now;
 - a value from `encode-time';
 - or t (with non-nil REPEAT) meaning the next integral
   multiple of REPEAT.
 
-REPEAT may be an integer or floating point number.  The
-action is to call FUNCTION with arguments ARGS.
+The action is to call FUNCTION with arguments ARGS.
 
 This function returns a timer object which you can use in
 `cancel-timer'."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]