12

Been looking for a solution to this for a while now. On OS X minors mode fill the menu bar with useless menu items. Here's a screenshot:

menubar](![minor modes taken over the menu bar

If you can't tell, Emacs menu items are blocking the rest of my menu bar. Is there a way to tell Emacs to not use the menu bar?

I'm using this port of emacs.

Malabarba
  • 22,878
  • 6
  • 78
  • 163
Ammar Alammar
  • 325
  • 1
  • 7
  • I'm not sure whether I understand your problem correctly. Do you want to disable the menu bar entirely, or do you just want to remove individual top-level items? –  Oct 09 '14 at 16:32
  • According to other answers, it's not possible to remove the menu bar entirely, so now I'm looking for a way to remove individual items. – Ammar Alammar Oct 10 '14 at 04:15

1 Answers1

11

You can't hide the menu bar on OS X from within Emacs. It's always shown for non-fullscreen applications, that's simply how OS X works. Applications have no influence on that.

No menu bar

If you'd like to use Emacs without any menu bar, enable fullscreen mode with M-x toggle-frame-fullscreen.

Removing individual items

If you'd just like to remove individual items from the menu bar, adjust the corresponding key maps in your init.el. For instance, the following snippet removes the “Options”, “Edit” and ”Tools” menus:

(define-key global-map [menu-bar options] nil)
(define-key global-map [menu-bar edit] nil)
(define-key global-map [menu-bar tools] nil)

A mailing list post from Xah Lee has more examples.

  • 1
    Awesome! This works for menus added by `(define-key global-map [menu-bar...` but doesn't work for items added using other packages like `easymenu`, do you have a solution for that? – Ammar Alammar Oct 10 '14 at 04:11
  • 2
    @AmmarAbdulaziz Well, remove the `menu-bar` binding from the corresponding key map. The details depend on where and how the menu is defined. In doubt, read the source. –  Oct 10 '14 at 09:48