comparison lispref/os.texi @ 72462:bacf0e610ccc

Tiny typo.
author Kim F. Storm <storm@cua.dk>
date Sun, 20 Aug 2006 20:57:26 +0000
parents 2a80ec1d7c00
children b35bf6359ff4
comparison
equal deleted inserted replaced
72461:2fee33a062da 72462:bacf0e610ccc
1485 1485
1486 @node Idle Timers 1486 @node Idle Timers
1487 @section Idle Timers 1487 @section Idle Timers
1488 1488
1489 Here is how to set up a timer that runs when Emacs is idle for a 1489 Here is how to set up a timer that runs when Emacs is idle for a
1490 certain length of time. Aside from how to set them nup, idle timers 1490 certain length of time. Aside from how to set them up, idle timers
1491 work just like ordinary timers. 1491 work just like ordinary timers.
1492 1492
1493 @deffn Command run-with-idle-timer secs repeat function &rest args 1493 @deffn Command run-with-idle-timer secs repeat function &rest args
1494 Set up a timer which runs when Emacs has been idle for @var{secs} 1494 Set up a timer which runs when Emacs has been idle for @var{secs}
1495 seconds. The value of @var{secs} may be an integer or a floating point 1495 seconds. The value of @var{secs} may be an integer or a floating point
1559 (cancel-timer resume-timer)) 1559 (cancel-timer resume-timer))
1560 ...@var{do the work for a while}... 1560 ...@var{do the work for a while}...
1561 (when @var{taking-a-break} 1561 (when @var{taking-a-break}
1562 (setq resume-timer 1562 (setq resume-timer
1563 (run-with-idle-timer 1563 (run-with-idle-timer
1564 ;; Compute an idle time @var{break-length} 1564 ;; Compute an idle time @var{break-length}
1565 ;; more than the current value. 1565 ;; more than the current value.
1566 (time-add (current-idle-time) 1566 (time-add (current-idle-time)
1567 (seconds-to-time @var{break-length})) 1567 (seconds-to-time @var{break-length}))
1568 nil 1568 nil
1569 'timer-function)))) 1569 'timer-function))))