# !nmacro(4)

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

## NAME

!nmacro - Execute line as if not in a macro

## SYNOPSIS

!nmacro command

## DESCRIPTION

!nmacro causes command to be executed as if it were initiated from the command line by the user, rather than from the macro context. When MicroEmacs 2009 executes a macro, by default any input the command requires is expected on the same line immediately following the command. If a line is preceded by a !nmacro (or !nma) directive, the command is executed as if it was invoked from the command line by the user, as such, the rest of the line is ignored and all input is obtained directly from the user, as per normal command interaction.

## EXAMPLE

The following example is taken from macro file `meme3_8.emf` and shows how to add a buffer mode.

    ; Add a buffer mode
    define-macro add-mode
        ; Has the require mode been given as an argument, if so add it
        !force 1 buffer-mode @1
        !if &not $status
            ; No - use 1 buffer-mode to add a mode
            !nma 1 buffer-mode
        !endif
    !emacro

The first line checks that the mode to add has not already been given as a macro argument, e.g. by executing the following line

    buffer-add-mode "view"

If this line fails then the argument was not specified and must be obtained from the user as normal.

## NOTES

Individual arguments may be obtained from the user using the @mn(4) interactive macro variables.

## SEE ALSO

@mn(4).

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

</HMTL>