diff options
| -rw-r--r-- | lisp/emacs-lisp/pp.el | 17 |
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. |
| 102 | If the pretty-printed value fits on one line, the message line is used | 102 | If pretty-printed EXPVAL fits on one line, display it in the echo |
| 103 | instead. The value is also consed onto the front of the list | 103 | area instead. Also add EXPVAL to the front of the list |
| 104 | in the variable `values'." | 104 | in the variable `values'. |
| 105 | (interactive "xPp-eval: ") | 105 | |
| 106 | (setq values (cons (eval expression) values)) | 106 | Non-interactively, the argument is the value, EXPVAL, not the expression |
| 107 | to 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 |