Next: How do I turn on syntax highlighting?, Previous: How can I create or modify new pull-down menu options?, Up: Common requests [Contents][Index]
The simplest way to remove a menu is to set its keymap to ‘nil’. For example, to delete the ‘Words’ menu (see How can I create or modify new pull-down menu options?), use:
(keymap-set global-map "<menu-bar> <words>" nil)
Similarly, removing a menu option requires redefining a keymap entry to
nil. For example, to delete the ‘Forward word’ menu option
from the ‘Edit’ menu (we added it in How can I create or modify new pull-down menu options?), use:
(keymap-set global-map "<menu-bar> <edit> <forward>" nil)