Function: eval-print-last-sexp
eval-print-last-sexp is an interactive and byte-compiled function
defined in elisp-mode.el.gz.
Signature
(eval-print-last-sexp &optional EVAL-LAST-SEXP-ARG-INTERNAL)
Documentation
Evaluate sexp before point; print value into current buffer.
Normally, this function truncates long output according to the value
of the variables eval-expression-print-length and
eval-expression-print-level. With a prefix argument of zero,
however, there is no such truncation. Such a prefix argument
also causes integers to be printed in several additional formats
(octal, hexadecimal, and character).
If eval-expression-debug-on-error is non-nil, which is the default,
this command arranges for all errors to enter the debugger.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/elisp-mode.el.gz
;;; Globally accessible functionality
(defun eval-print-last-sexp (&optional eval-last-sexp-arg-internal)
"Evaluate sexp before point; print value into current buffer.
Normally, this function truncates long output according to the value
of the variables `eval-expression-print-length' and
`eval-expression-print-level'. With a prefix argument of zero,
however, there is no such truncation. Such a prefix argument
also causes integers to be printed in several additional formats
\(octal, hexadecimal, and character).
If `eval-expression-debug-on-error' is non-nil, which is the default,
this command arranges for all errors to enter the debugger."
(interactive "P")
(let ((standard-output (current-buffer)))
(terpri)
(eval-last-sexp (or eval-last-sexp-arg-internal t))
(terpri)))