!nmacro - Execute line as if not in a macro
!nmacro command
!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 '99 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 me3_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
buffer-add-mode "view"
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.
(c) Copyright JASSPA 1999
Last Modified: 1999/01/29
Generated On: 1999/12/01