# MicroEmacs - Macro Language Glossary

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

## MACRO LANGUAGE GLOSSARY

The following is a list of all of the macro language commands available in MicroEmacs, refer to Writing MicroEmacs Macros for information on writing macros.

## Functions

All functions are denoted by a & prefix as follows:-

&abs(4) Absolute value of a number
&add(4) Add two numbers
&and(4) Logical AND operator
&atoi(4) ASCII to integer conversion
&band(4) Bitwise AND operator
&bmode(4) Determine buffer mode
&bnot(4) Bitwise NOT operator
&bor(4) Bitwise OR operator
&bstat(4) Retrieve current buffer statistic
&bxor(4) Bitwise XOR operator
&cat(4) Concatenate two strings together
&cbind(4) Return the command a key is bound to
&cond(4) Conditional expression operator
&dec(4) Pre-decrement variable
&divide(4) Division of two numbers
&equal(4) Numerical equivalence operator
&exist(4) Test if a variable or command exists
&find(4) Find a file on the search path
&gmode(4) Determine global mode
&great(4) Numerical greater than operator
&inc(4) Pre-increment variable
&indirect(4) Evaluate a string as a variable
&inword(4) Test for a word character
&irep(4) Case insensitive replace string in string
&isequal(4) Case insensitive String equivalence operator
&isin(4) Case insensitive test for string in string
&itoa(4) Integer to ASCII conversion
&kbind(4) Return the key a command is bound to
&ldel(4) Delete list item
&left(4) Return the left most characters from a string
&len(4) Return the length of a string
&less(4) Numerical less than operator
&lfind(4) Find list item
&lget(4) Get list item
&linsert(4) Insert list item
&lset(4) Set list item
&mid(4) Return a portion (middle) of a string
&mod(4) Modulus of two numbers
&multiply(4) Multiply two numbers
&nbind(4) Return the numerial argument of a binding
&nbmode(4) Determine named buffer mode
&negate(4) Negation of two numbers
&not(4) Logical NOT operator
&opt(4) MicroEmacs optional feature test
&or(4) Logical OR operator
&pdec(4) Post-decrement variable
&pinc(4) Post-increment variable
&reg(4) Retrieve a registry value (with default)
&rep(4) Replace string in string
&right(4) Return the right most characters from a string
&risin(4) Recursive case insensitive test for string in string
&rsin(4) Recursively test for string in string
&sequal(4) String equivalence operator
&set(4) In-line macro variable assignment
&sgreat(4) String greater than operator
&sin(4) Test for string in string
&sless(4) String less than operator
&slower(4) Return the string converted to lower case
&sprintf(4) Formatted string construction
&stat(4) Retrieve a file statistic
&sub(4) Subtract two numbers
&supper(4) Return the string converted to upper case
&trboth(4) Return string trimmed of white chars on both sides
&trleft(4) Return string trimmed of white chars on left side
&trright(4) Return string trimmed of white chars on right side
&which(4) Find a program on the path
&xirep(4) Regex case insensitive Replace string in string
&xisequal(4) Case insensitive regex String equivalence operator
&xrep(4) Regex replace string in string
&xsequal(4) Regex string equivalence operator

## Directives

The macro directives are denoted by a ! prefix as follows:-

!abort(4) Exit macro with a FALSE status
!bell(4) Sound audio alarm
!continue(4) Restart a conditional loop
!done(4) End a conditional loop
!ehelp(4) Terminate a help definition
!elif(4) Conditional test statement, continuation
!else(4) Conditional alternative statement
!emacro(4) Terminate a macro definition
!endif(4) Conditional test termination
!force(4) Ignore command or macro status
!goto(4) Unconditional labeled jump
!if(4) Conditional test statement
!jump(4) Unconditional jump
!nmacro(4) Ignore command or macro status
!repeat(4) Conditional loop (post testing)
!return(4) Exit macro with a TRUE status
!tgoto(4) Conditional labeled jump
!tjump(4) Unconditional relative branch
!until(4) Test a conditional loop
!while(4) Conditional loop

## Variables

The macro variables are denoted by a % for user variables; # for a register variable and @ for an interactive variable as follows:-

@0(4) Macro arguments (macro name)
@1(4) Macro arguments (first argument)
@2(4) Macro arguments (second argument)
@?(4) Macro arguments (numeric argument given)
@cc(4) Current command name
@cck(4) Current command key
@cg(4) Get a command name from the user
@cgk(4) Get a key from the user
@cl(4) Last command name
@clk(4) Last command key
@cq(4) Get a quoted command name from the user
@cqk(4) Get a quoted key from the user
@fs(4) Frame store variable
@fss(4) Frame store scheme variable
@h0(4) General history string
@h1(4) Buffer history string
@h2(4) Command history string
@h3(4) File history string
@h4(4) Search history string
@hash(4) Macro arguments (numeric argument value)
@mc(4) Message line character input request
@ml(4) Message line input request
@mn(4) Message line input as normal request
@mna(4) All input from Message line as normal
@mx(4) Message line input by executing command
@mxa(4) All input from Message line by executing command
@p(4) Macro arguments (calling macro name)
@s0(4) Last search's whole match string
@s1(4) Last search's first group value
@s2(4) Last search's second group value
@wc(4) Extract character from the current buffer
@wl(4) Extract a line from the current buffer
@y(4) Yank buffer variable
BufferVariables(4) Buffer variables
CmdVariables(4) Command variables
CommandVariables(4) Last, current and get a command key/name
CurrentBufferVariables(4) Extract information from the current buffer
HistoryGroupVariables(4) Last history values
MacroArguments(4) Arguments to macros
MacroNumericArguments(4) Numeric arguments to macros
MessageLineVaraibles(4) Prompt the user for input on message line
RegisterVariables(4) Register variables
SearchGroups(4) Last search group values
Variables(4) User defined macro variables

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

</HMTL>