$buffer-input - Divert buffer input through macro.
$buffer-input commandName
$buffer-input allows the buffer input mechanism to be diverted through a command macro defined by commandName. If this variable is set to a valid command, which may be a user defined macro, this command will be called instead. The command can access the actual key-code typed by the user via the command variable @cc(4), e.g. the following macro prints out the name of the command that the user presses until the abort-command(2) is executed.
define-macro test-input ml-write &spr "Current command: %s" @cc !if &seq @cc "abort-command" set-variable $buffer-input "" !endif !emacro set-variable $buffer-input test-input
Caution is advised when using this, if there is no way of reseting the variable then MicroEmacs '99 must be killed.
(c) Copyright JASSPA 1999
Last Modified: 1998/07/10
Generated On: 1999/12/01