I have been using XEmacs for years and have completely redefined the menubar for my productivity. I would like to replace XEmacs with Emacs 28.2. I have tried several ways to redefine some menubar items, but so far, no luck. I copied menu-bar.el to my .emacs.d and load it from .emacs. I can tell that the local file is being read, as I have re-ordered the menus and they appear as desired:
File Edit Tools Options Buffers
So far, so good. However I removed the "New Tab" and "Close Tab" entries from menu-bar-file-menu definition, but they still appear in the File menu. I tried
(define-key global-map [menu-bar] nil)
(define-key global-map [menu-bar] (make-sparse-keymap "menu-bar"))
hoping this would re-create the keymaps. No luck. I also tried
(define-key global-map [menu-bar file] nil)
(define-key global-map [menu-bar edit] nil)
(define-key global-map [menu-bar options] nil)
(define-key global-map [menu-bar buffer] nil)
(define-key global-map [menu-bar tools] nil)
(define-key global-map [menu-bar help-menu] nil)
Again, hoping to get the keymap redefined, but the two tab entries still appear. I realize, I can delete and add menu entries, but to get the customization I want, this would entail more effort than re-defining menu-bar.el
Any idea what I'm doing wrong?
menu-bar-file-menu
, which define the various menus. Looking at the code of library MenuBar+ might help; dunno.