$major-mode-ids(5)$major-mode-ids - Filtered major-mode ID list
$major-mode-ids MajorModeId
$major-mode-ids 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 $major-mode-ids returns the name of the next major-mode which matches the filter until no more major-modes are found, in which case an empty string is returned.
The following example prints out the full name of all major-modes to the massage line one at a time. Note that &set(4) is used on the !while(4) statement to avoid evaluating $major-mode-ids twice per loop.
set-variable $major-mode-ids ".*" !while ¬ &seq "" &set #l0 $major-mode-ids 0 major-mode #l0 set-variable #l1 $result 100 ml-write &spr "mode %s: %s" #l0 &lget #l1 5 !done
(c) Copyright JASSPA 2026
Last Modified: 2026/01/30
Generated On: 2026/01/31