diff options
| author | Chong Yidong | 2011-06-04 18:46:26 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-06-04 18:46:26 -0400 |
| commit | 7dbe3dbc59819b3ee9ac5f6f4cbc1989edb3412c (patch) | |
| tree | a38c5f4dcb88c7449a4b6d1a541d16f4b0aeea0a | |
| parent | de65b42cbf9d2d0fb200a6115ae092b8eff1cb25 (diff) | |
| download | emacs-7dbe3dbc59819b3ee9ac5f6f4cbc1989edb3412c.tar.gz emacs-7dbe3dbc59819b3ee9ac5f6f4cbc1989edb3412c.zip | |
Doc fixes for timer.el (Bug#8793).
* emacs-lisp/timer.el (timer-activate): Remove unused arg.
(timer-activate, timer-activate-when-idle): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/timer.el | 40 |
2 files changed, 25 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0e04adc9359..ed08474bdcb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-06-04 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * emacs-lisp/timer.el (timer-activate): Remove unused arg. | ||
| 4 | (timer-activate, timer-activate-when-idle): Doc fix (Bug#8793). | ||
| 5 | |||
| 1 | 2011-06-04 Michael Albinus <michael.albinus@gmx.de> | 6 | 2011-06-04 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * net/tramp-sh.el (tramp-find-shell): Apply workaround also for | 8 | * net/tramp-sh.el (tramp-find-shell): Apply workaround also for |
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 5f069226aa9..0a035175041 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el | |||
| @@ -189,35 +189,35 @@ fire repeatedly that many seconds apart." | |||
| 189 | (setcdr reuse-cell timers)) | 189 | (setcdr reuse-cell timers)) |
| 190 | (setq reuse-cell (cons timer timers))) | 190 | (setq reuse-cell (cons timer timers))) |
| 191 | ;; Insert new timer after last which possibly means in front of queue. | 191 | ;; Insert new timer after last which possibly means in front of queue. |
| 192 | (if last | 192 | (cond (last (setcdr last reuse-cell)) |
| 193 | (setcdr last reuse-cell) | 193 | (idle (setq timer-idle-list reuse-cell)) |
| 194 | (if idle | 194 | (t (setq timer-list reuse-cell))) |
| 195 | (setq timer-idle-list reuse-cell) | ||
| 196 | (setq timer-list reuse-cell))) | ||
| 197 | (setf (timer--triggered timer) triggered-p) | 195 | (setf (timer--triggered timer) triggered-p) |
| 198 | (setf (timer--idle-delay timer) idle) | 196 | (setf (timer--idle-delay timer) idle) |
| 199 | nil) | 197 | nil) |
| 200 | (error "Invalid or uninitialized timer"))) | 198 | (error "Invalid or uninitialized timer"))) |
| 201 | 199 | ||
| 202 | (defun timer-activate (timer &optional triggered-p reuse-cell idle) | 200 | (defun timer-activate (timer &optional triggered-p reuse-cell) |
| 203 | "Put TIMER on the list of active timers. | 201 | "Insert TIMER into `timer-list'. |
| 202 | If TRIGGERED-P is t, make TIMER inactive (put it on the list, but | ||
| 203 | mark it as already triggered). To remove it, use `cancel-timer'. | ||
| 204 | 204 | ||
| 205 | If TRIGGERED-P is t, that means to make the timer inactive | 205 | REUSE-CELL, if non-nil, is a cons cell to reuse when inserting |
| 206 | \(put it on the list, but mark it as already triggered). | 206 | TIMER into `timer-list' (usually a cell removed from that list by |
| 207 | To remove from the list, use `cancel-timer'. | 207 | `cancel-timer-internal'; using this reduces consing for repeat |
| 208 | 208 | timers). If nil, allocate a new cell." | |
| 209 | REUSE-CELL, if non-nil, is a cons cell to reuse instead | ||
| 210 | of allocating a new one." | ||
| 211 | (timer--activate timer triggered-p reuse-cell nil)) | 209 | (timer--activate timer triggered-p reuse-cell nil)) |
| 212 | 210 | ||
| 213 | (defun timer-activate-when-idle (timer &optional dont-wait reuse-cell) | 211 | (defun timer-activate-when-idle (timer &optional dont-wait reuse-cell) |
| 214 | "Arrange to activate TIMER whenever Emacs is next idle. | 212 | "Insert TIMER into `timer-idle-list'. |
| 215 | If optional argument DONT-WAIT is non-nil, then enable the | 213 | This arranges to activate TIMER whenever Emacs is next idle. |
| 216 | timer to activate immediately, or at the right time, if Emacs | 214 | If optional argument DONT-WAIT is non-nil, set TIMER to activate |
| 217 | is already idle. | 215 | immediately, or at the right time, if Emacs is already idle. |
| 218 | 216 | ||
| 219 | REUSE-CELL, if non-nil, is a cons cell to reuse instead | 217 | REUSE-CELL, if non-nil, is a cons cell to reuse when inserting |
| 220 | of allocating a new one." | 218 | TIMER into `timer-idle-list' (usually a cell removed from that |
| 219 | list by `cancel-timer-internal'; using this reduces consing for | ||
| 220 | repeat timers). If nil, allocate a new cell." | ||
| 221 | (timer--activate timer (not dont-wait) reuse-cell 'idle)) | 221 | (timer--activate timer (not dont-wait) reuse-cell 'idle)) |
| 222 | 222 | ||
| 223 | (defalias 'disable-timeout 'cancel-timer) | 223 | (defalias 'disable-timeout 'cancel-timer) |