From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: The display margin Date: Sun, 25 May 2003 12:36:01 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305251636.h4PGa1ll021935@rum.cs.yale.edu> References: <16080.60869.212521.952911@nick.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053880578 30829 80.91.224.249 (25 May 2003 16:36:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 25 May 2003 16:36:18 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 25 18:36:15 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19JyTm-00080c-00 for ; Sun, 25 May 2003 18:36:14 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19Jyga-00089Q-00 for ; Sun, 25 May 2003 18:49:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19JyVU-0002N0-Ps for emacs-devel@quimby.gnus.org; Sun, 25 May 2003 12:38:00 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19JyV5-0002Io-Rs for emacs-devel@gnu.org; Sun, 25 May 2003 12:37:35 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19JyV3-0002FN-KG for emacs-devel@gnu.org; Sun, 25 May 2003 12:37:34 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19JyTa-0001vu-7v for emacs-devel@gnu.org; Sun, 25 May 2003 12:36:02 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h4PGa1x6021937; Sun, 25 May 2003 12:36:01 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h4PGa1ll021935; Sun, 25 May 2003 12:36:01 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Nick Roberts 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:14242 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14242 > > Following Kim's changes, I thought it might be timely to ask a question > about the display margin. > > When a breakpoint is set, using M-x gdba as debugger, an icon is placed in the > margin. The toolbar can be used to do this but the cursor must be placed on the > appropriate line beforehand. I would like to be able to do this directly with a > binding like: > > (define-key gud-minor-mode-map [left-margin mouse-1] 'gud-break) > > This does work but currently only if cursor is placed on the appropriate line > beforehand as with the toolbar. > > Q: Could this binding be made to work, so that the breakpoint is set where > the click is made in the margin, regardless of the location of the cursor? You might try something like: (defun gud-break (&optional event) "Set break point." (interactive (list last-input-event)) ;; Go to wherever the event happened. (if event (ignore-errors (mouse-set-point event))) ...) I haven't tried it, tho. Also you might need to use separate functions for gud-break-from-toolbar than gud-break-from-margin. Stefan