]> git.eshelyaron.com Git - emacs.git/commitdiff
(with-timeout): Improve argument/docstring consistency.
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 4 Jul 2005 01:22:30 +0000 (01:22 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 4 Jul 2005 01:22:30 +0000 (01:22 +0000)
lisp/emacs-lisp/timer.el

index 79aad8bd121509368a3a2b5609d50cc6f814c214..d9662f91c7f17369894fce29a318dce1b8b320f9 100644 (file)
@@ -408,12 +408,11 @@ This function returns a timer object which you can use in `cancel-timer'."
 (defmacro with-timeout (list &rest body)
   "Run BODY, but if it doesn't finish in SECONDS seconds, give up.
 If we give up, we run the TIMEOUT-FORMS and return the value of the last one.
-The call should look like:
- (with-timeout (SECONDS TIMEOUT-FORMS...) BODY...)
 The timeout is checked whenever Emacs waits for some kind of external
-event \(such as keyboard input, input from subprocesses, or a certain time);
+event (such as keyboard input, input from subprocesses, or a certain time);
 if the program loops without waiting in any way, the timeout will not
-be detected."
+be detected.
+\n(fn (SECONDS TIMEOUT-FORMS...) BODY)"
   (let ((seconds (car list))
        (timeout-forms (cdr list)))
     `(let ((with-timeout-tag (cons nil nil))