Mercurial > emacs
changeset 80167:b48b70b93856
(gdb-mouse-set-clear-breakpoint): Fall back
to mouse-set-point in buffers that aren't associated with files.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Wed, 20 Feb 2008 19:57:10 +0000 |
parents | c1cca80b3720 |
children | 77d3ee77571c |
files | lisp/progmodes/gdb-ui.el |
diffstat | 1 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el Wed Feb 20 19:54:47 2008 +0000 +++ b/lisp/progmodes/gdb-ui.el Wed Feb 20 19:57:10 2008 +0000 @@ -1972,15 +1972,17 @@ (interactive "e") (mouse-minibuffer-check event) (let ((posn (event-end event))) - (if (numberp (posn-point posn)) - (with-selected-window (posn-window posn) - (save-excursion - (goto-char (posn-point posn)) - (if (or (posn-object posn) - (eq (car (fringe-bitmaps-at-pos (posn-point posn))) - 'breakpoint)) - (gud-remove nil) - (gud-break nil))))))) + (if (buffer-file-name) + (if (numberp (posn-point posn)) + (with-selected-window (posn-window posn) + (save-excursion + (goto-char (posn-point posn)) + (if (or (posn-object posn) + (eq (car (fringe-bitmaps-at-pos (posn-point posn))) + 'breakpoint)) + (gud-remove nil) + (gud-break nil))))) + (posn-set-point posn)))) (defun gdb-mouse-toggle-breakpoint-margin (event) "Enable/disable breakpoint in left margin with mouse click."