[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The display margin

From: Stefan Monnier
Subject: Re: The display margin
Date: Sun, 25 May 2003 12:36:01 -0400

> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]