# $mode-names(5)

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

## NAME

$mode-names - Filtered mode name list

## SYNOPSIS

$mode-names ModeName

## DESCRIPTION

$mode-names must first be initialized to the required filter string, if the variable is evaluated before it is initialized the value will be set to "ABORT" and the command will fail. The filter takes the form of a regex.

Once initialized, evaluating $mode-names returns the name of the next mode which matches the filter until no more modes are found, in which case an empty string is returned.

## EXAMPLE

The following example prints out the name of all modes to the massage line one at a time. Note that &set(4) is used on the !while(4) statement to avoid evaluating $mode-names twice per loop.

    set-variable $mode-names "*"
    !while &not &seq &set #l0 $mode-names ""
        100 ml-write &cat "mode: " #l0
    !done

## SEE ALSO

buffer-mode(2), &bmode(4), $buffer-names(5), $command-names(5), Regular Expressions.

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

</HMTL>