aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/elisp-mode.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index bdc304e0aa5..daf5e41d288 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -1116,10 +1116,17 @@ include additional formats for integers \(octal, hexadecimal, and
1116character)." 1116character)."
1117 (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t))) 1117 (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)))
1118 ;; Setup the lexical environment if lexical-binding is enabled. 1118 ;; Setup the lexical environment if lexical-binding is enabled.
1119 (elisp--eval-last-sexp-print-value 1119 (prog1
1120 (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) 1120 (elisp--eval-last-sexp-print-value
1121 eval-last-sexp-arg-internal))) 1121 (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding)
1122 1122 eval-last-sexp-arg-internal)
1123 ;; If we are going to display the result in the echo area, force
1124 ;; a more thorough redisplay, in case the sexp we evaluated
1125 ;; changes something that should affect the display of the
1126 ;; current window. Otherwise, Emacs might decide that only the
1127 ;; echo area needs to be redisplayed.
1128 (if (eq standard-output t)
1129 (force-mode-line-update 'all)))))
1123 1130
1124(defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal) 1131(defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal)
1125 (let ((unabbreviated (let ((print-length nil) (print-level nil)) 1132 (let ((unabbreviated (let ((print-length nil) (print-level nil))