emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Remove Org and Tbl from menubar for derived mode
Date: Sat, 14 Sep 2013 00:42:31 -0400	[thread overview]
Message-ID: <87zjrghv48.fsf@gmail.com> (raw)
In-Reply-To: 523304D4.90604@gmail.com

Christian Wittern <cwittern@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

  parent reply	other threads:[~2013-09-14  4:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 12:28 Remove Org and Tbl from menubar for derived mode Christian Wittern
2013-09-13 12:44 ` Carsten Dominik
2013-09-14  0:43   ` Suvayu Ali
2013-09-14  0:44   ` Suvayu Ali
2013-09-13 13:09 ` Thorsten Jolitz
2013-09-13 23:36   ` Christian Wittern
2013-09-14  4:42 ` Nick Dokos [this message]
2013-09-14  4:42 ` Jambunathan K
2013-09-16  1:24   ` Christian Wittern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zjrghv48.fsf@gmail.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).