aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-01-10 01:14:26 +0000
committerRichard M. Stallman2007-01-10 01:14:26 +0000
commit247bc2725b463c492d1990106584a683e00cb464 (patch)
tree5acae87539600c557edc7392fb871c946cf4b446
parent3ad0c61641c7f5010ad4c22cbbe6b57e534c149a (diff)
downloademacs-247bc2725b463c492d1990106584a683e00cb464.tar.gz
emacs-247bc2725b463c492d1990106584a683e00cb464.zip
(pp-eval-expression): Once again eval the argument, but read it as `X' does.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/pp.el17
2 files changed, 12 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d33c4a23c08..809f6510b9c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-01-10 Richard Stallman <rms@gnu.org>
2
3 * emacs-lisp/pp.el (pp-eval-expression): Once again eval the
4 argument, but read it as `X' does.
5
12007-01-09 Juri Linkov <juri@jurta.org> 62007-01-09 Juri Linkov <juri@jurta.org>
2 7
3 * info.el (Info-fontify-node): Don't hide node names of index entries. 8 * info.el (Info-fontify-node): Don't hide node names of index entries.
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 77f8854e022..27cb936c598 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -97,16 +97,13 @@ 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 (expval) 100(defun pp-eval-expression (expression)
101 "Evaluate an expression, then pretty-print value EXPVAL into a new buffer. 101 "Evaluate EXPRESSION and pretty-print its value.
102If pretty-printed EXPVAL fits on one line, display it in the echo 102Also add the value to the front of the list in the variable `values'."
103area instead. Also add EXPVAL to the front of the list 103 (interactive
104in the variable `values'. 104 (list (read-from-minibuffer "Eval: " nil read-expression-map t
105 105 'read-expression-history)))
106Non-interactively, the argument is the value, EXPVAL, not the expression 106 (setq values (cons (eval expression) values))
107to evaluate."
108 (interactive "XPp-eval: ")
109 (setq values (cons expval values))
110 (let* ((old-show-function temp-buffer-show-function) 107 (let* ((old-show-function temp-buffer-show-function)
111 ;; Use this function to display the buffer. 108 ;; Use this function to display the buffer.
112 ;; This function either decides not to display it at all 109 ;; This function either decides not to display it at all