!nmacro - Execute line as if not in a macro
!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 '06 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.
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 ¬ $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
If this line fails then the argument was not specified and must be obtained from the user as normal.
Individual arguments may be obtained from the user using the @mn(4) interactive macro variables.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2002/01/11
Generated On: 2006/10/07