Christian Wittern <cwitt...@gmail.com> writes:

> Hi there,
>
> I am developing a mode derived from org for special editing and
> browsing purposes.  I will add my own menu to the menubar and would
> like to remove the menus added by org, "Org" and "Tbl", in order not
> to confuse my users, who will be Emacs newbies in most cases.
> I tried several things like
>
> (define-key org-mode-map [menu-bar Org] nil)
> or
> (define-key global-map [menu-bar Org] nil)
> and some other combinations of this line of thought, but nothing
> succeeded in removing the stuff.
>
> I wonder if anybody here has any advice?
>
> All the best and thanks in advance,
>

The elisp manual says (sec. 22.17.5, "The Menu Bar"):

,----
|    A local keymap can cancel a menu bar item made by the global keymap
| by rebinding the same fake function key with `undefined' as the
| binding.  For example, this is how Dired suppresses the `Edit' menu bar
| item:
| 
|      (define-key dired-mode-map [menu-bar edit] 'undefined)
`----

-- 
Nick


Reply via email to