emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/gdb-ui.el


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/lisp/gdb-ui.el
Date: Sat, 22 Nov 2003 19:27:38 -0500

Index: emacs/lisp/gdb-ui.el
diff -c emacs/lisp/gdb-ui.el:1.48 emacs/lisp/gdb-ui.el:1.49
*** emacs/lisp/gdb-ui.el:1.48   Wed Nov 19 18:40:17 2003
--- emacs/lisp/gdb-ui.el        Sat Nov 22 19:27:38 2003
***************
*** 145,150 ****
--- 145,153 ----
                          (gud-call "until *%a" arg)))
           "\C-u" "Continue to current line or address.")
  
+   (define-key gud-minor-mode-map [left-margin mouse-1] 
'gdb-mouse-toggle-breakpoint)
+   (define-key gud-minor-mode-map [left-fringe mouse-1] 
'gdb-mouse-toggle-breakpoint)
+ 
    (setq comint-input-sender 'gdb-send)
    ;;
    ;; (re-)initialise
***************
*** 1054,1059 ****
--- 1057,1076 ----
                                  (gdb-put-string "b" (+ start 1))))))))))))
          (end-of-line)))))
    (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
+ 
+ (defun gdb-mouse-toggle-breakpoint (event)
+   "Toggle breakpoint with mouse click in left margin."
+   (interactive "e")
+   (mouse-minibuffer-check event)
+   (let ((posn (event-end event)))
+     (message "pt=%S posn=%S" (posn-point posn) posn)
+     (if (numberp (posn-point posn))
+       (with-selected-window (posn-window posn)
+         (save-excursion
+           (goto-char (posn-point posn))
+           (if (posn-object posn)
+               (gud-remove nil)
+             (gud-break nil)))))))
  
  (defun gdb-breakpoints-buffer-name ()
    (with-current-buffer gud-comint-buffer




reply via email to

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