diff options
| author | Gerd Moellmann | 2001-07-26 09:28:58 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-07-26 09:28:58 +0000 |
| commit | 6849e6d5ee7f28d6a7061d2381997cc19e918c77 (patch) | |
| tree | 78f33dbe9a74b4b65eb3dfa7217b2aebadda3980 | |
| parent | 11c781133762eeb07d650846a1578cd1536b140f (diff) | |
| download | emacs-6849e6d5ee7f28d6a7061d2381997cc19e918c77.tar.gz 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.
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 7 |
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." | |||
| 377 | expr)) | 377 | expr)) |
| 378 | (set-syntax-table stab)))))) | 378 | (set-syntax-table stab)))))) |
| 379 | (let ((print-length eval-expression-print-length) | 379 | (let ((print-length eval-expression-print-length) |
| 380 | (print-level eval-expression-print-level)) | 380 | (print-level eval-expression-print-level) |
| 381 | (prin1 value))))) | 381 | (start (point))) |
| 382 | (prin1 value) | ||
| 383 | (when (bufferp standard-output) | ||
| 384 | (put-text-property start (point) 'printed-value value)))))) | ||
| 382 | 385 | ||
| 383 | (defun eval-last-sexp (eval-last-sexp-arg-internal) | 386 | (defun eval-last-sexp (eval-last-sexp-arg-internal) |
| 384 | "Evaluate sexp before point; print value in minibuffer. | 387 | "Evaluate sexp before point; print value in minibuffer. |