[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104494: Doc fixes for timer.el (Bug#
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104494: Doc fixes for timer.el (Bug#8793). |
Date: |
Sat, 04 Jun 2011 18:46:26 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104494
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-06-04 18:46:26 -0400
message:
Doc fixes for timer.el (Bug#8793).
* emacs-lisp/timer.el (timer-activate): Remove unused arg.
(timer-activate, timer-activate-when-idle): Doc fix.
modified:
lisp/ChangeLog
lisp/emacs-lisp/timer.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-06-04 14:11:26 +0000
+++ b/lisp/ChangeLog 2011-06-04 22:46:26 +0000
@@ -1,3 +1,8 @@
+2011-06-04 Chong Yidong <address@hidden>
+
+ * emacs-lisp/timer.el (timer-activate): Remove unused arg.
+ (timer-activate, timer-activate-when-idle): Doc fix (Bug#8793).
+
2011-06-04 Michael Albinus <address@hidden>
* net/tramp-sh.el (tramp-find-shell): Apply workaround also for
=== modified file 'lisp/emacs-lisp/timer.el'
--- a/lisp/emacs-lisp/timer.el 2011-01-25 04:08:28 +0000
+++ b/lisp/emacs-lisp/timer.el 2011-06-04 22:46:26 +0000
@@ -189,35 +189,35 @@
(setcdr reuse-cell timers))
(setq reuse-cell (cons timer timers)))
;; Insert new timer after last which possibly means in front of queue.
- (if last
- (setcdr last reuse-cell)
- (if idle
- (setq timer-idle-list reuse-cell)
- (setq timer-list reuse-cell)))
+ (cond (last (setcdr last reuse-cell))
+ (idle (setq timer-idle-list reuse-cell))
+ (t (setq timer-list reuse-cell)))
(setf (timer--triggered timer) triggered-p)
(setf (timer--idle-delay timer) idle)
nil)
(error "Invalid or uninitialized timer")))
-(defun timer-activate (timer &optional triggered-p reuse-cell idle)
- "Put TIMER on the list of active timers.
-
-If TRIGGERED-P is t, that means to make the timer inactive
-\(put it on the list, but mark it as already triggered).
-To remove from the list, use `cancel-timer'.
-
-REUSE-CELL, if non-nil, is a cons cell to reuse instead
-of allocating a new one."
+(defun timer-activate (timer &optional triggered-p reuse-cell)
+ "Insert TIMER into `timer-list'.
+If TRIGGERED-P is t, make TIMER inactive (put it on the list, but
+mark it as already triggered). To remove it, use `cancel-timer'.
+
+REUSE-CELL, if non-nil, is a cons cell to reuse when inserting
+TIMER into `timer-list' (usually a cell removed from that list by
+`cancel-timer-internal'; using this reduces consing for repeat
+timers). If nil, allocate a new cell."
(timer--activate timer triggered-p reuse-cell nil))
(defun timer-activate-when-idle (timer &optional dont-wait reuse-cell)
- "Arrange to activate TIMER whenever Emacs is next idle.
-If optional argument DONT-WAIT is non-nil, then enable the
-timer to activate immediately, or at the right time, if Emacs
-is already idle.
+ "Insert TIMER into `timer-idle-list'.
+This arranges to activate TIMER whenever Emacs is next idle.
+If optional argument DONT-WAIT is non-nil, set TIMER to activate
+immediately, or at the right time, if Emacs is already idle.
-REUSE-CELL, if non-nil, is a cons cell to reuse instead
-of allocating a new one."
+REUSE-CELL, if non-nil, is a cons cell to reuse when inserting
+TIMER into `timer-idle-list' (usually a cell removed from that
+list by `cancel-timer-internal'; using this reduces consing for
+repeat timers). If nil, allocate a new cell."
(timer--activate timer (not dont-wait) reuse-cell 'idle))
(defalias 'disable-timeout 'cancel-timer)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104494: Doc fixes for timer.el (Bug#8793).,
Chong Yidong <=