I'm creating custom major mode derived from js-mode
which comes with it's own menu entry "Javascript" (top-level entry, between Tools & Help (sorry, not sure what the correct name for that UI element is)).
I would like to hide/remove that menu since I don't have need for it (deriving from js-mode
mostly for indentation settings which I know is probably an overkill).
I found this piece of information here:
(define-key global-map [menu-bar words] nil)
so I have tried calling
(define-key global-map [menu-bar javascript] nil)
from inside define-derived-mode
and my-mode-hook
, but neither option worked (javascript
menu bar name was guessed based on the UI label as I am not sure where can I check the actual name).
Any ideas on what I'm doing wrong with this approach? Or perhaps there is another way to hide/remove menu items?