create-callback - Create a timer callback
n create-callback "command"
create-callback creates a timer based callback command. The given command is called back in n milliseconds time. This can be used by the user to monitor system events (such as incoming mail). The command is called only once, but if the command creates a callback of itself a loop is created.
If a negative argument n is given any pending callback for command is cancelled.
The following example creates a callback that is invoked every 10 minutes.
define-macro Example-callback ml-write "It was 10 minutes since you last saw me!" 600000 create-callback Example-callback !emacro Example-callback
A call-back cannot interrupt while MicroEmacs is active, instead the call-back is delayed until MicroEmacs becomes inactive. MicroEmacs is considered to be inactive when it is waiting for user input, this could be during the execution of another macro. If a command or macro requires no user input then once execution has started, it cannot be interrupted by a call-back macro.
The resolution of the clock is platform dependent, some platforms limit the minimum timer period to 10 milliseconds.
MicroEmacs does not guarantee to service the callbacks within any set time constraints, the resultant callback intervals may be of a slightly different duration than requested.
When a callback macro is executed, the key given by @cck(4) is "callback. If the current buffer has a $buffer-input(5) command set, this command will be called instead of the callback command with @cc and @cck set appropriately. It is the responsibility of the input macro to deal with the callback.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2006/07/28
Generated On: 2006/10/07