aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-10-18 11:02:31 +0000
committerRichard M. Stallman2006-10-18 11:02:31 +0000
commit6d44694e8c7bfff871759a681297dec6dc7a85fa (patch)
treeb671e5504de67eb0d1c7530fabc82c2cbd9d7420
parent71a05b36ba10235182f5909eb452cbf5635b8df9 (diff)
downloademacs-6d44694e8c7bfff871759a681297dec6dc7a85fa.tar.gz
emacs-6d44694e8c7bfff871759a681297dec6dc7a85fa.zip
(pp-eval-expression): Use `X' to read value.
Non-interactive arg is the value, not the expression.
-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 f30b69ddac0..a9cb2abd741 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)."
97 (princ (pp-to-string object) (or stream standard-output))) 97 (princ (pp-to-string object) (or stream standard-output)))
98 98
99;;;###autoload 99;;;###autoload
100(defun pp-eval-expression (expression) 100(defun pp-eval-expression (expval)
101 "Evaluate EXPRESSION and pretty-print value into a new display buffer. 101 "Evaluate an expression, then pretty-print value EXPVAL into a new buffer.
102If the pretty-printed value fits on one line, the message line is used 102If pretty-printed EXPVAL fits on one line, display it in the echo
103instead. The value is also consed onto the front of the list 103area instead. Also add EXPVAL to the front of the list
104in the variable `values'." 104in the variable `values'.
105 (interactive "xPp-eval: ") 105
106 (setq values (cons (eval expression) values)) 106Non-interactively, the argument is the value, EXPVAL, not the expression
107to evaluate."
108 (interactive "XPp-eval: ")
109 (setq values (cons expval values))
107 (let* ((old-show-function temp-buffer-show-function) 110 (let* ((old-show-function temp-buffer-show-function)
108 ;; Use this function to display the buffer. 111 ;; Use this function to display the buffer.
109 ;; This function either decides not to display it at all 112 ;; This function either decides not to display it at all