]> git.eshelyaron.com Git - emacs.git/commitdiff
(jdb): Add gud-print.
authorNick Roberts <nickrob@snap.net.nz>
Thu, 12 Apr 2007 14:24:54 +0000 (14:24 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Thu, 12 Apr 2007 14:24:54 +0000 (14:24 +0000)
(gud-find-expr): Jdb prints the expression with the value, so
don't insert it in the output.

lisp/progmodes/gud.el

index dea956ca16e5c2bd1574e08dca65a1b32422651a..3d252190eff32ea7927b4005b33e6c92bc43eda0 100644 (file)
@@ -2304,6 +2304,8 @@ gud, see `gud-mode'."
   (gud-def gud-up     "up\C-Mwhere"   "<"    "Up one stack frame.")
   (gud-def gud-down   "down\C-Mwhere" ">"    "Up one stack frame.")
   (gud-def gud-run    "run"           nil    "Run the program.") ;if VM start using jdb
+  (gud-def gud-print  "print %e"  "\C-p" "Evaluate Java expression at point.")
+
 
   (setq comint-prompt-regexp "^> \\|^[^ ]+\\[[0-9]+\\] ")
   (setq paragraph-start comint-prompt-regexp)
@@ -2853,7 +2855,9 @@ Obeying it means displaying in another window the specified file and line."
          (when (looking-at comint-prompt-regexp)
            (set-marker gud-delete-prompt-marker (point))
            (set-marker-insertion-type gud-delete-prompt-marker t))
-         (insert (concat  expr " = ")))))
+         (unless (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
+                     'jdb)
+             (insert (concat  expr " = "))))))
     expr))
 
 ;; The next eight functions are hacked from gdbsrc.el by