From: Nick Roberts Date: Wed, 20 Feb 2008 19:57:10 +0000 (+0000) Subject: (gdb-mouse-set-clear-breakpoint): Fall back X-Git-Tag: emacs-pretest-22.1.92~109 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a03392ff83e2f8fc1b3aeef32b84e8fda8522ad6;p=emacs.git (gdb-mouse-set-clear-breakpoint): Fall back to mouse-set-point in buffers that aren't associated with files. --- diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 56241846ebd..94f1f539200 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1972,15 +1972,17 @@ static char *magick[] = { (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."