changeset 79668:5a1bd3d071b6

(gud-def): Do nothing if gud-running is t. (gud-speedbar-menu-items): Add item for gdb-var-set-format below.
author Nick Roberts <nickrob@snap.net.nz>
date Thu, 03 Jan 2008 22:00:06 +0000
parents 87eecf56e2a6
children cbbc63d75d5e
files lisp/progmodes/gud.el
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gud.el	Thu Jan 03 21:58:33 2008 +0000
+++ b/lisp/progmodes/gud.el	Thu Jan 03 22:00:06 2008 +0000
@@ -364,9 +364,10 @@
      (defun ,func (arg)
        ,@(if doc (list doc))
        (interactive "p")
-       ,(if (stringp cmd)
-	    `(gud-call ,cmd arg)
-	  cmd))
+       (if (not gud-running)
+	 ,(if (stringp cmd)
+	      `(gud-call ,cmd arg)
+	    cmd)))
      ,(if key `(local-set-key ,(concat "\C-c" key) ',func))
      ,(if key `(global-set-key (vconcat gud-key-prefix ,key) ',func))))
 
@@ -458,7 +459,13 @@
     ["Auto raise frame" gdb-speedbar-auto-raise
      :style toggle :selected gdb-speedbar-auto-raise
      :visible (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
-		    '(gdbmi gdba))])
+		    '(gdbmi gdba))]
+    ("Output Format"
+     :visible (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
+		    '(gdbmi gdba))
+     ["Binary" (gdb-var-set-format "binary") t]
+     ["Natural" (gdb-var-set-format  "natural") t]
+     ["Hexadecimal" (gdb-var-set-format "hexadecimal") t]))
   "Additional menu items to add to the speedbar frame.")
 
 ;; Make sure our special speedbar mode is loaded