changeset 38566:795feb9422e4

(eval-last-sexp-1): If standard-output is a buffer, put a text property `printed-value' on the printed representation, with the Lisp object printed as value.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 26 Jul 2001 09:28:58 +0000
parents af9f5dd840a3
children 5ee0cb00ee57
files lisp/emacs-lisp/lisp-mode.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el	Thu Jul 26 02:35:08 2001 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el	Thu Jul 26 09:28:58 2001 +0000
@@ -377,8 +377,11 @@
 			   expr))
 		     (set-syntax-table stab))))))
       (let ((print-length eval-expression-print-length)
-	    (print-level eval-expression-print-level))
-	(prin1 value)))))
+	    (print-level eval-expression-print-level)
+	    (start (point)))
+	(prin1 value)
+	(when (bufferp standard-output)
+	  (put-text-property start (point) 'printed-value value))))))
 
 (defun eval-last-sexp (eval-last-sexp-arg-internal)
   "Evaluate sexp before point; print value in minibuffer.