diff options
| author | Juanma Barranquero | 2005-07-04 01:22:30 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2005-07-04 01:22:30 +0000 |
| commit | 7452fadcb3c10e01070ec0e0e43144934b015f04 (patch) | |
| tree | 38054e97a8d6c9a3f601dab271e351cebbda42f6 | |
| parent | 9a6f3ca53295806007d2b61c165cec6e68be5320 (diff) | |
| download | emacs-7452fadcb3c10e01070ec0e0e43144934b015f04.tar.gz emacs-7452fadcb3c10e01070ec0e0e43144934b015f04.zip | |
(with-timeout): Improve argument/docstring consistency.
| -rw-r--r-- | lisp/emacs-lisp/timer.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 79aad8bd121..d9662f91c7f 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el | |||
| @@ -408,12 +408,11 @@ This function returns a timer object which you can use in `cancel-timer'." | |||
| 408 | (defmacro with-timeout (list &rest body) | 408 | (defmacro with-timeout (list &rest body) |
| 409 | "Run BODY, but if it doesn't finish in SECONDS seconds, give up. | 409 | "Run BODY, but if it doesn't finish in SECONDS seconds, give up. |
| 410 | If we give up, we run the TIMEOUT-FORMS and return the value of the last one. | 410 | If we give up, we run the TIMEOUT-FORMS and return the value of the last one. |
| 411 | The call should look like: | ||
| 412 | (with-timeout (SECONDS TIMEOUT-FORMS...) BODY...) | ||
| 413 | The timeout is checked whenever Emacs waits for some kind of external | 411 | The timeout is checked whenever Emacs waits for some kind of external |
| 414 | event \(such as keyboard input, input from subprocesses, or a certain time); | 412 | event (such as keyboard input, input from subprocesses, or a certain time); |
| 415 | if the program loops without waiting in any way, the timeout will not | 413 | if the program loops without waiting in any way, the timeout will not |
| 416 | be detected." | 414 | be detected. |
| 415 | \n(fn (SECONDS TIMEOUT-FORMS...) BODY)" | ||
| 417 | (let ((seconds (car list)) | 416 | (let ((seconds (car list)) |
| 418 | (timeout-forms (cdr list))) | 417 | (timeout-forms (cdr list))) |
| 419 | `(let ((with-timeout-tag (cons nil nil)) | 418 | `(let ((with-timeout-tag (cons nil nil)) |