aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/pp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2006-10-18 11:02:31 +0000
committerRichard M. Stallman <[email protected]>2006-10-18 11:02:31 +0000
commit6d44694e8c7bfff871759a681297dec6dc7a85fa (patch)
treeb671e5504de67eb0d1c7530fabc82c2cbd9d7420 /lisp/emacs-lisp/pp.el
parent71a05b36ba10235182f5909eb452cbf5635b8df9 (diff)
(pp-eval-expression): Use `X' to read value.
Non-interactive arg is the value, not the expression.
Diffstat (limited to 'lisp/emacs-lisp/pp.el')
-rw-r--r--lisp/emacs-lisp/pp.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index f30b69ddac..a9cb2abd74 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -97,13 +97,16 @@ 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 (expression)
- "Evaluate EXPRESSION and pretty-print value into a new display buffer.
-If the pretty-printed value fits on one line, the message line is used
-instead. The value is also consed onto the front of the list
-in the variable `values'."
- (interactive "xPp-eval: ")
- (setq values (cons (eval expression) values))
+(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))
(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