diff options
| author | Eli Zaretskii | 2015-11-06 21:21:52 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-06 21:21:52 +0200 |
| commit | 19e09cfab61436cb4590303871a31ee07624f5ab (patch) | |
| tree | d3c2a351783b2d0a9c58e513c76b5c7cc58b082b /lisp | |
| parent | 8025fdbbea6eaaa3e1290864fe2dc48e2201df48 (diff) | |
| download | emacs-19e09cfab61436cb4590303871a31ee07624f5ab.tar.gz emacs-19e09cfab61436cb4590303871a31ee07624f5ab.zip | |
Ensure redisplay after evaluation
* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Revert
last change.
* lisp/frame.el (redisplay--variables): Populate the
redisplay--variables list.
* src/xdisp.c (maybe_set_redisplay): New function.
(syms_of_xdisp) <redisplay--variables>: New variable.
* src/window.h (maybe_set_redisplay): Declare prototype.
* src/data.c (set_internal): Call maybe_set_redisplay. (Bug#21835)
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/frame.el | 7 | ||||
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 14 |
2 files changed, 10 insertions, 11 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index f5508517dc6..4b23cb20ac4 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -2231,6 +2231,13 @@ See also `toggle-frame-maximized'." | |||
| 2231 | (make-obsolete-variable | 2231 | (make-obsolete-variable |
| 2232 | 'window-system-version "it does not give useful information." "24.3") | 2232 | 'window-system-version "it does not give useful information." "24.3") |
| 2233 | 2233 | ||
| 2234 | ;; These variables should trigger redisplay of the current buffer. | ||
| 2235 | (setq redisplay--variables | ||
| 2236 | '(line-spacing | ||
| 2237 | overline-margin | ||
| 2238 | line-prefix | ||
| 2239 | wrap-prefix)) | ||
| 2240 | |||
| 2234 | (provide 'frame) | 2241 | (provide 'frame) |
| 2235 | 2242 | ||
| 2236 | ;;; frame.el ends here | 2243 | ;;; frame.el ends here |
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index daf5e41d288..8ea17b74ddb 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -1116,17 +1116,9 @@ 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 | (prog1 | 1119 | (elisp--eval-last-sexp-print-value |
| 1120 | (elisp--eval-last-sexp-print-value | 1120 | (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) |
| 1121 | (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) | 1121 | eval-last-sexp-arg-internal))) |
| 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))))) | ||
| 1130 | 1122 | ||
| 1131 | (defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal) | 1123 | (defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal) |
| 1132 | (let ((unabbreviated (let ((print-length nil) (print-level nil)) | 1124 | (let ((unabbreviated (let ((print-length nil) (print-level nil)) |