# $buffer-input(5)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

$buffer-input - Divert buffer input through macro.

## SYNOPSIS

$buffer-input commandName

## DESCRIPTION

$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

## WARNING

Caution is advised when using this, if there is no way of reseting the variable then MicroEmacs 2009 must be killed.

## SEE ALSO

abort-command(2), @cc(4).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>