diff options
| author | Eli Zaretskii | 2015-11-06 11:28:46 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-06 11:28:46 +0200 |
| commit | 29c360ee1cb0ba68470d831739d4df33016fada1 (patch) | |
| tree | f07aa14ec266b28c4aa93dc08ece8c24c36fc2be | |
| parent | 2b316c0581181be173459cd791585ad7ecadfe8e (diff) | |
| download | emacs-29c360ee1cb0ba68470d831739d4df33016fada1.tar.gz emacs-29c360ee1cb0ba68470d831739d4df33016fada1.zip | |
Ensure redisplay after "C-x C-e"
* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Make sure
redisplay happens to account for any side effects of the evaluated
sexp. (Bug#21835)
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 15 |
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 | |||
| 1116 | character)." | 1116 | character)." |
| 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)) |