From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: Toolbar problems with GDB mode. Date: Sun, 5 Jan 2003 23:20:13 +0000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <15896.48557.231339.570521@nick.uklinux.net> References: <200301032305.h03N5hdw022091@stubby.bodenonline.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1041809134 13529 80.91.224.249 (5 Jan 2003 23:25:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 5 Jan 2003 23:25:34 +0000 (UTC) Cc: jan.h.d@swipnet.se Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18VK97-0003Vx-00 for ; Mon, 06 Jan 2003 00:25:33 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18VKCu-0001wG-00 for ; Mon, 06 Jan 2003 00:29:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18VK7R-0002dk-00 for emacs-devel@quimby.gnus.org; Sun, 05 Jan 2003 18:23:49 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18VK6h-0001ZO-00 for emacs-devel@gnu.org; Sun, 05 Jan 2003 18:23:03 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18VK6a-0001Ku-00 for emacs-devel@gnu.org; Sun, 05 Jan 2003 18:22:58 -0500 Original-Received: from bts-0002.dialup.zetnet.co.uk ([194.247.48.2] helo=nick.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18VK6Y-0001Bj-00; Sun, 05 Jan 2003 18:22:54 -0500 Original-Received: by nick.uklinux.net (Postfix, from userid 501) id 471DB76037; Sun, 5 Jan 2003 23:20:14 +0000 (GMT) Original-To: rms@gnu.org In-Reply-To: X-Mailer: VM 6.97 under Emacs 21.3.50.3 Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10512 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10512 > Is this menu defined in a local map or a in the global map? In other > words, is this a bug in GUD or a bug in Emacs' handling of menus? Its on the local map (gud-minor-map). I think the patch below is the right fix for `M-x gdb' as toolbar and menubar are reset if the user kills the GUD buffer or types quit there. If you agree, I will install it after making further changes so that it works for `M-x gdba' too. Nick --- gud.el.~1.170.~ Sun Dec 22 00:01:30 2002 +++ gud.el Sun Jan 5 23:07:43 2003 @@ -2423,6 +2423,12 @@ (gud-filter proc "")))))) (defun gud-sentinel (proc msg) + (dolist (buffer (buffer-list)) + (save-excursion + (set-buffer buffer) + (when gud-minor-mode + (setq gud-minor-mode nil) + (kill-local-variable 'tool-bar-map)))) (cond ((null (buffer-name (process-buffer proc))) ;; buffer killed ;; Stop displaying an arrow in a source file.