]> git.eshelyaron.com Git - emacs.git/commitdiff
(pp-eval-expression): Once again eval the argument, but read it as `X' does.
authorRichard M. Stallman <rms@gnu.org>
Wed, 10 Jan 2007 01:14:26 +0000 (01:14 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 10 Jan 2007 01:14:26 +0000 (01:14 +0000)
lisp/ChangeLog
lisp/emacs-lisp/pp.el

index d33c4a23c08e2d2ca85be60f74fcedb236423872..809f6510b9c5ab5e701861cf3bef232897c2b8c7 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-10  Richard Stallman  <rms@gnu.org>
+
+       * emacs-lisp/pp.el (pp-eval-expression): Once again eval the
+       argument, but read it as `X' does.
+
 2007-01-09  Juri Linkov  <juri@jurta.org>
 
        * info.el (Info-fontify-node): Don't hide node names of index entries.
index 77f8854e022b3813aef75382158c2225faebd920..27cb936c59837cc1d46106a911007326e253b028 100644 (file)
@@ -97,16 +97,13 @@ Output stream is STREAM, or value of `standard-output' (which see)."
   (princ (pp-to-string object) (or stream standard-output)))
 
 ;;;###autoload
-(defun pp-eval-expression (expval)
-  "Evaluate an expression, then pretty-print value EXPVAL into a new buffer.
-If pretty-printed EXPVAL fits on one line, display it in the echo
-area instead.  Also add EXPVAL to the front of the list
-in the variable `values'.
-
-Non-interactively, the argument is the value, EXPVAL, not the expression
-to evaluate."
-  (interactive "XPp-eval: ")
-  (setq values (cons expval values))
+(defun pp-eval-expression (expression)
+  "Evaluate EXPRESSION and pretty-print its value.
+Also add the value to the front of the list in the variable `values'."
+  (interactive
+   (list (read-from-minibuffer "Eval: " nil read-expression-map t
+                              'read-expression-history)))
+  (setq values (cons (eval expression) values))
   (let* ((old-show-function temp-buffer-show-function)
         ;; Use this function to display the buffer.
         ;; This function either decides not to display it at all