# !emacro(4)

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

## NAME

!emacro - Terminate a macro definition
!ehelp - Terminate a help definition

## SYNOPSIS

define-macro macro-name

... macro body ...

!emacro
define-help item-name

... help body ...

!ehelp

## DESCRIPTION

!emacro terminates the storage of an open macro, (opened with define-macro(2)). Only the lines between define-macro and the !emacro directive comprise the new macro macro-name.

Similarly !ehelp terminates the storage of an open help definition, (opened with define-help(2)). Only the lines between define-help and the !ehelp directive comprise the new help text for item item-name.

!emacro and !ehelp may not be used in any other context.

## EXAMPLE

For example if a file is being executed contains the text:

    ;
    ; Read in a file in view mode, and make the window red
    ;
    define-macro view-a-file
        find-file @ml"File to view: "
        1 buffer-mode "view"
        set-variable $buffer-bcol %red
    !emacro

    define-help view-a-file
        This is the help text for the macro view-a-file.
    !ehelp

    ml-write "[view-a-file macro has been loaded]"

then only the lines between the define-macro command and the !emacro directive are stored in macro view-a-file and the lines between the define-help command and the !ehelp directive are stored as help for view-a-file. The ml-write line is executed when the file is loaded, and the message will appear on the message line, this does not however form part of the macro or help.

## SEE ALSO

Operating Modes, define-macro(2), define-help(2).

Writing MicroEmacs Macros
Macro Glossary
Macro Debugging - A Crash Course
MicroEmacs Macro Language at a Glance

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

</HMTL>