changeset 70351:8e55901472d6

(gud-watch): Let user select an expression. (menu): Fix typo.
author Nick Roberts <nickrob@snap.net.nz>
date Wed, 03 May 2006 00:17:35 +0000
parents b78699e9fbbd
children f98b5ff9f3ce d9f8d2a65d18
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Wed May 03 00:16:17 2006 +0000
+++ b/lisp/progmodes/gdb-ui.el	Wed May 03 00:17:35 2006 +0000
@@ -690,10 +690,13 @@
 	  (if event (posn-set-point (event-end event)))
 	  (require 'tooltip)
 	  (save-selected-window
-	    (let ((expr (if arg
-			    (completing-read "Name of variable: "
-					     'gud-gdb-complete-command)
-			  (tooltip-identifier-from-point (point)))))
+	    (let ((expr
+		   (if arg
+		       (completing-read "Name of variable: "
+					'gud-gdb-complete-command)
+		     (if (and transient-mark-mode mark-active)
+			 (buffer-substring (region-beginning) (region-end))
+		       (tooltip-identifier-from-point (point))))))
 	      (catch 'already-watched
 		(dolist (var gdb-var-list)
 		  (unless (string-match "\\." (car var))
@@ -2691,7 +2694,7 @@
     '(menu-item "Inferior IO" gdb-frame-separate-io-buffer
 		:enable gdb-use-separate-io-buffer))
   (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer))
-  (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer))
+  (define-key menu [disassembly] '("Disassembly" . gdb-frame-assembler-buffer))
   (define-key menu [breakpoints]
     '("Breakpoints" . gdb-frame-breakpoints-buffer))
   (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer))