From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: The display margin Date: 25 Nov 2003 23:42:57 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <16080.60869.212521.952911@nick.uklinux.net> <200305251636.h4PGa1ll021935@rum.cs.yale.edu> <16082.42589.935105.932019@nick.uklinux.net> <16321.14941.117864.117597@nick.uklinux.net> <16323.50586.988.440316@nick.uklinux.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1069796686 13727 80.91.224.253 (25 Nov 2003 21:44:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2003 21:44:46 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Nov 25 22:44:44 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AOkzD-00016b-00 for ; Tue, 25 Nov 2003 22:44:43 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AOkzD-0006Yp-00 for ; Tue, 25 Nov 2003 22:44:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AOlwT-0007jb-5g for emacs-devel@quimby.gnus.org; Tue, 25 Nov 2003 17:45:57 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AOlvv-0007gq-DO for emacs-devel@gnu.org; Tue, 25 Nov 2003 17:45:23 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AOlvM-0007Kc-VJ for emacs-devel@gnu.org; Tue, 25 Nov 2003 17:45:19 -0500 Original-Received: from [193.162.153.4] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AOlvL-0007Jw-L6 for emacs-devel@gnu.org; Tue, 25 Nov 2003 17:44:47 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id D200B262961; Tue, 25 Nov 2003 22:43:21 +0100 (CET) Original-To: Nick Roberts In-Reply-To: <16323.50586.988.440316@nick.uklinux.net> Original-Lines: 32 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18120 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18120 Nick Roberts writes: > > It's not necessary to have a display margin -- as clicking on the left > > fringe will also generate an event to toggle the breakpoint ... > > provided that the buffer's local-map is setup to the > > gud-minor-mode-map. > > > > So once you click in the fringe to set a breakpoint, you can open the > > margin. > > Thats interesting. If I try this with M-x gdb (and presumably any other > debugger in GUD) it doesn't open the margin (as these don't currently display > breakpoint icons) but it does set a breakpoint. However, clicking at the same > location on the fringe in this case it doesn't seem to toggle the breakpoint > but sets another one on the same line. > > Can gdb-mouse-toggle-breakpoint be modified so that it works in the fringe > for these debuggers too? Of course, but that's for you to find out :-) My current implementation of gdb-mouse-toggle-breakpoint was just a proof of concept, so it cheats by checking whether it is clicked on an object (blindly assuming that it's a breakpoint icon) or not. If there is an object, it clears the breakpoint; otherwise it sets it. I suppose you will have to improve that so that it consults the list of breakpoints (somehow) and determines whether there already is a breakpoint at the current line (and deletes it). -- Kim F. Storm http://www.cua.dk