$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 '06 must be killed.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2002/01/11
Generated On: 2006/10/07