emacs-devel
[Top][All Lists]
Advanced

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

perldb and gud-print


From: Mario Lang
Subject: perldb and gud-print
Date: Thu, 11 Sep 2003 21:06:43 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Hi.

While playing with M-x perldb, I noticed that gud-print (C-x C-a C-p)
currently evaluates the expression at point, rather than printing the result
of evaluating it.  Just evaluating an expression is not very useful
since as long as the expression has no side-effects, no output is produced
in the GUD buffer.  If C-x C-a C-p would actually print the result of
evaluating the expression, one could simply place point on some variable
name in the source-buffer and execute gud-print to see the current value
of that variable.  With the current version of gud-print, simply no
output is generated at all.

Is there any reason why gud-print should not print the result of evaluating
the expression with perldb?  If not, please install attached patch.

Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.5383
diff -u -r1.5383 ChangeLog
--- lisp/ChangeLog      10 Sep 2003 20:09:17 -0000      1.5383
+++ lisp/ChangeLog      11 Sep 2003 18:44:32 -0000
@@ -1,3 +1,8 @@
+2003-09-11  Mario Lang  <address@hidden>
+
+       * progmodes/gud.el (perldb): Change gud-print from just "%e" to "p %e"
+       to actually print the expression at point, not just evaluate it.
+
 2003-09-10  Mario Lang  <address@hidden>
 
        * battery.el: Update Commentary and Copyright.
Index: lisp/progmodes/gud.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/gud.el,v
retrieving revision 1.6
diff -u -r1.6 gud.el
--- lisp/progmodes/gud.el       1 Sep 2003 15:45:35 -0000       1.6
+++ lisp/progmodes/gud.el       11 Sep 2003 18:44:39 -0000
@@ -1261,7 +1261,7 @@
 ;  (gud-def gud-finish "finish"       "\C-f" "Finish executing current 
function.")
 ;  (gud-def gud-up     "up %p"        "<" "Up N stack frames (numeric arg).")
 ;  (gud-def gud-down   "down %p"      ">" "Down N stack frames (numeric arg).")
-  (gud-def gud-print  "%e"           "\C-p" "Evaluate perl expression at 
point.")
+  (gud-def gud-print  "p %e"           "\C-p" "Evaluate perl expression at 
point.")
 
   (setq comint-prompt-regexp "^  DB<+[0-9]+>+ ")
   (setq paragraph-start comint-prompt-regexp)

-- 
Thanks,
  Mario | Debian Developer <URL:http://debian.org/>
        | Get my public key via finger address@hidden
        | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44




reply via email to

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