From a03392ff83e2f8fc1b3aeef32b84e8fda8522ad6 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 20 Feb 2008 19:57:10 +0000 Subject: [PATCH] (gdb-mouse-set-clear-breakpoint): Fall back to mouse-set-point in buffers that aren't associated with files. --- lisp/progmodes/gdb-ui.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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." -- 2.39.2