From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Remove Org and Tbl from menubar for derived mode Date: Sat, 14 Sep 2013 00:42:31 -0400 Message-ID: <87zjrghv48.fsf@gmail.com> References: <523304D4.90604@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKhh9-00037G-Cn for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 00:43:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKhh2-0007Tk-2P for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 00:42:55 -0400 Received: from plane.gmane.org ([80.91.229.3]:59789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKhh1-0007Tg-SD for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 00:42:48 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VKhh0-0007w8-Ge for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 06:42:46 +0200 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Sep 2013 06:42:46 +0200 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Sep 2013 06:42:46 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Christian Wittern 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