From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: menu-bar-map variable Date: Sun, 1 Apr 2007 21:11:16 +1200 Message-ID: <17935.30516.272171.376755@farnswood.snap.net.nz> References: <17932.46017.825959.576713@farnswood.snap.net.nz> <17933.64347.370845.146020@farnswood.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1175418856 6329 80.91.229.12 (1 Apr 2007 09:14:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Apr 2007 09:14:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 01 11:14:13 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HXw8a-0005oj-TC for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 11:14:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXwBU-00040m-Es for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 05:17:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HXwBM-00040h-Bi for emacs-devel@gnu.org; Sun, 01 Apr 2007 05:17:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HXwBK-00040U-GI for emacs-devel@gnu.org; Sun, 01 Apr 2007 05:17:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXwBK-00040R-74 for emacs-devel@gnu.org; Sun, 01 Apr 2007 05:17:02 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HXw8N-0006Tw-Ud; Sun, 01 Apr 2007 05:14:00 -0400 Original-Received: from farnswood.snap.net.nz (74.63.255.123.dynamic.snap.net.nz [123.255.63.74]) by viper.snap.net.nz (Postfix) with ESMTP id 4FE683DA228; Sun, 1 Apr 2007 21:13:51 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 500) id 1D611627ED; Sun, 1 Apr 2007 10:11:16 +0100 (BST) In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.96.4 X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68882 Archived-At: Richard Stallman writes: > > There is a feature by which a minor mode can turn off specific global > > menu items. It should be in the manual. > > Unfortunately tmm-menubar-mouse doesn't seem to work with this feature > (items that are no longer visible get selected). > > Can someone fix this? I can localise the problem to tmm-get-keybind and these two lines: (setq allbind (cons (local-key-binding keyseq) allbind)) (setq allbind (cons (global-key-binding keyseq) allbind)) If I remove a menu-item in the global map e.g file (define-key global-map [menu-bar file] 'undefined) the tmm handles this properly as the entry is removed from (global-key-binding [menu-bar]): (keymap (file . undefined)... However, if I remove a menu-item in the local map, e.g, edit in the scratch buffer: (define-key lisp-interaction-mode-map [menu-bar edit] 'undefined) then I get: (local-key-binding [menu-bar]) (keymap (edit . undefined)) but tmm still thinks it's there because it's still in the global list (global-key-binding [menu-bar]): ...(edit "Edit" keymap (undo ... ^^^^ Perhaps Emacs has it's own function to handle this. There is no corresponding problem with a graphical display. -- Nick http://www.inet.net.nz/~nickrob