From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: how to remove a menu item? Date: Mon, 2 Feb 2009 20:12:28 -0800 Message-ID: <002901c985b5$a0ec3820$0200a8c0@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233634393 16005 80.91.229.12 (3 Feb 2009 04:13:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2009 04:13:13 +0000 (UTC) To: "'B. T. Raven'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 03 05:14:27 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LUCg3-0001YX-O3 for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Feb 2009 05:14:23 +0100 Original-Received: from localhost ([127.0.0.1]:48445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUCel-0000JU-00 for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Feb 2009 23:13:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUCeR-0000I5-Ia for help-gnu-emacs@gnu.org; Mon, 02 Feb 2009 23:12:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUCeO-0000FI-To for help-gnu-emacs@gnu.org; Mon, 02 Feb 2009 23:12:43 -0500 Original-Received: from [199.232.76.173] (port=35029 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUCeO-0000F0-Or for help-gnu-emacs@gnu.org; Mon, 02 Feb 2009 23:12:40 -0500 Original-Received: from rcsinet13.oracle.com ([148.87.113.125]:58601 helo=rgminet13.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LUCeO-0003jq-EC for help-gnu-emacs@gnu.org; Mon, 02 Feb 2009 23:12:40 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n134DSDk023079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 3 Feb 2009 04:13:30 GMT Original-Received: from acsmt707.oracle.com (acsmt707.oracle.com [141.146.40.85]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n134CUM2032575; Tue, 3 Feb 2009 04:12:33 GMT Original-Received: from dradamslap1 (/141.144.67.90) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 03 Feb 2009 04:12:29 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcmFqNdOBHUsOUzwTWuiefwJHuEARgADCx9A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt707.oracle.com [141.146.40.85] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4987C430.0221:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61867 Archived-At: > >> if i want to remove the menu under Help ? Emacs > >> Psychotherapist, how do i do it? > > > > C-h k, then click Help > Emacs Psychotherapist shows this: > > > > ,---- > > | runs the > > | command doctor > > | which is an interactive autoloaded Lisp function in `doctor'. > > | It is bound to . > > | (doctor) > > | > > | Switch to *doctor* buffer and start giving psychotherapy. > > `---- > > > > Either of these will get rid of this binding: > > > > (define-key global-map [menu-bar help-menu > > emacs-psychotherapist] nil) > > > > (define-key menu-bar-help-menu [emacs-psychotherapist] nil) > > Thanks, Drew. On my build it was "eliza" rather than > "emacs-psychotherapist" that was revealed by C-h k. Evaluating the > define-key expression stripped the bottom item off the help menu but > left the separator bar. Look in lisp/menu-bar.el for the binding of `eliza'. Just after or before it will be a separator definition. Define that pseudo-key to nil. E.g. in Emacs 22.1, menu-bar.el: (define-key menu-bar-help-menu [eliza] '(menu-item "Emacs Psychotherapist" doctor :help "Our doctor will help you feel better")) (define-key menu-bar-help-menu [sep4] '("--")) (define-key menu-bar-help-menu [describe-no-warranty] '(menu-item "(Non)Warranty" describe-no-warranty :help "Explain that Emacs has NO WARRANTY")) That corresponds to these menu items, in order: (Non)Warranty ------------- Emacs Psychotherapist This will remove the Dr and the separator: (define-key menu-bar-help-menu [eliza] nil) (define-key menu-bar-help-menu [sep4] nil)