Commit 6d44694e authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(pp-eval-expression): Use `X' to read value.

Non-interactive arg is the value, not the expression.
parent 71a05b36
...@@ -97,13 +97,16 @@ Output stream is STREAM, or value of `standard-output' (which see)." ...@@ -97,13 +97,16 @@ Output stream is STREAM, or value of `standard-output' (which see)."
(princ (pp-to-string object) (or stream standard-output))) (princ (pp-to-string object) (or stream standard-output)))
;;;###autoload ;;;###autoload
(defun pp-eval-expression (expression) (defun pp-eval-expression (expval)
"Evaluate EXPRESSION and pretty-print value into a new display buffer. "Evaluate an expression, then pretty-print value EXPVAL into a new buffer.
If the pretty-printed value fits on one line, the message line is used If pretty-printed EXPVAL fits on one line, display it in the echo
instead. The value is also consed onto the front of the list area instead. Also add EXPVAL to the front of the list
in the variable `values'." in the variable `values'.
(interactive "xPp-eval: ")
(setq values (cons (eval expression) 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) (let* ((old-show-function temp-buffer-show-function)
;; Use this function to display the buffer. ;; Use this function to display the buffer.
;; This function either decides not to display it at all ;; This function either decides not to display it at all
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment