emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

menu-bar-options-save and menu-bar-options-menu


From: Drew Adams
Subject: menu-bar-options-save and menu-bar-options-menu
Date: Mon, 17 Jan 2005 21:17:57 -0800

I expect that modifying the Options menu will be one thing that customizing
users will want to do - especially adding options that are toggles.

Command `menu-bar-options-save' saves the changed options that appear in the
`menu-bar-options-menu'. However, the list of such options in
`menu-bar-options-save' is hard-coded, which seems inflexible.

If you change `menu-bar-options-menu' (e.g. adding an option to the menu),
you must (usually) separately change the hard-coded definition of
`menu-bar-options-save'. Presumably these two definitions were created by
hand and will be maintained by hand.

Could the list used in `menu-bar-options-save' be generated somehow from the
list of actual menu items at runtime? Or could the menu itself be generated
by a macro that also has the side effect of creating the list for
`menu-bar-options-save'? IOW, in some way (at runtime or compile-time), link
the two definitions by program, rather than by hand maintenance?

If such an approach is not taken, could a comment at least be added to 1)
the doc string of `menu-bar-options-save' and 2) the code defining the
Options menu, to indicate this maintenance relation between the function's
definition and the menu items more clearly? Something along the lines of "If
you modify the Options menu, you might want to also update the list of
options to be saved in `menu-bar-options-save'.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]