Function: edebug-eval-last-sexp

edebug-eval-last-sexp is an interactive and byte-compiled function defined in edebug.el.gz.

Signature

(edebug-eval-last-sexp &optional DISPLAY-TYPE)

Documentation

Evaluate sexp before point in the outside environment.

If DISPLAY-TYPE is pretty-print (interactively, a non-zero prefix argument), pretty-print the value in a separate buffer. Otherwise, print the value in minibuffer. If DISPLAY-TYPE is any other non-nil value (or interactively with a prefix argument of zero), show the full length of the expression, not limited by edebug-print-length or edebug-print-level.

View in manual

Probably introduced at or before Emacs version 27.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/edebug.el.gz
(defun edebug-eval-last-sexp (&optional display-type)
  "Evaluate sexp before point in the outside environment.
If DISPLAY-TYPE is `pretty-print' (interactively, a non-zero
prefix argument), pretty-print the value in a separate buffer.
Otherwise, print the value in minibuffer.  If DISPLAY-TYPE is any
other non-nil value (or interactively with a prefix argument of
zero), show the full length of the expression, not limited by
`edebug-print-length' or `edebug-print-level'."
  (interactive
   (list (and current-prefix-arg
              (if (zerop (prefix-numeric-value current-prefix-arg))
                  'no-truncate
                'pretty-print))))
  (if (or (null display-type)
          (eq display-type 'pretty-print))
      (edebug-eval-expression (edebug-last-sexp) display-type)
    (let ((edebug-print-length nil)
          (edebug-print-level nil))
      (edebug-eval-expression (edebug-last-sexp)))))