summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-07-26 09:28:58 +0000
committerGerd Moellmann <gerd@gnu.org>2001-07-26 09:28:58 +0000
commit6849e6d5ee7f28d6a7061d2381997cc19e918c77 (patch)
tree78f33dbe9a74b4b65eb3dfa7217b2aebadda3980 /lisp/emacs-lisp
parent11c781133762eeb07d650846a1578cd1536b140f (diff)
downloademacs-6849e6d5ee7f28d6a7061d2381997cc19e918c77.tar.gz
emacs-6849e6d5ee7f28d6a7061d2381997cc19e918c77.tar.bz2
emacs-6849e6d5ee7f28d6a7061d2381997cc19e918c77.zip
(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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 062bb7534a2..252e35d33cb 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -377,8 +377,11 @@ With argument, print output into current buffer."
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.