Resources for Menus

The menus in exmh are defined similarly to buttons.
Naturally, menus are a little more complex than buttons -- but
the general idea is the same.
There are parallel sets of resources for the two parts of menus:
system-defined and user-defined.
Each section has a list of menus defined
with the menulist and umenulist.
Each menu, in turn, has a text resource that defines
the label on the menu button.
The entrylist and uentrylist resources list
the entries that are found under the menu.
Again, the system-defined entries are listed under entrylist;
users should add new entries to uentrylist.

Each menu entry has resources with the following naming
convention (this is not standard Tk).
If the entrylist item is foo, then:

Note the additional .m component in the
*Main.help.m.entrylist resource name.
The *Main.help resource corresponds to the menu button, and
*Main.help.m corresponds to the menu associated with that button.

Here's another example.
We'll use
the uentrylist resource to add a new menu entry to
the message More... menu.
It will be a check-button type of entry -- to set the Tcl
variable controlling the "skip marked" behavior of Next and
Prev.
We'll also separate the user-defined entries from the
system entries with a special separator menu entry.
The resources in your ~/.exmh-defaults file
would look something like this:

In this case, the Tcl variable is ftoc(skipMarked),
an element of an associative Tcl array.
Menu entries that use Tcl variables defined by exmh
might stop working in a future release.
However, you can easily get an idea of what the important
variables are by searching through the code for Preferences_Add
calls.
These calls set up the relationship between the internal Tcl
variables and the Preference items you see in the interface.
In most cases, the variables are elements of an associative array.
In the example above, ftoc is the array that holds the state variables
for ftoc.tcl, which implements the table of contents.