(make-obsolete-variable
'window-system-version "it does not give useful information." "24.3")
+;; These variables should trigger redisplay of the current buffer.
+(setq redisplay--variables
+ '(line-spacing
+ overline-margin
+ line-prefix
+ wrap-prefix))
+
(provide 'frame)
;;; frame.el ends here
character)."
(let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)))
;; Setup the lexical environment if lexical-binding is enabled.
- (prog1
- (elisp--eval-last-sexp-print-value
- (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding)
- eval-last-sexp-arg-internal)
- ;; If we are going to display the result in the echo area, force
- ;; a more thorough redisplay, in case the sexp we evaluated
- ;; changes something that should affect the display of the
- ;; current window. Otherwise, Emacs might decide that only the
- ;; echo area needs to be redisplayed.
- (if (eq standard-output t)
- (force-mode-line-update 'all)))))
+ (elisp--eval-last-sexp-print-value
+ (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding)
+ eval-last-sexp-arg-internal)))
(defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal)
(let ((unabbreviated (let ((print-length nil) (print-level nil))
return;
}
+ maybe_set_redisplay (symbol);
sym = XSYMBOL (symbol);
start:
extern void fset_redisplay (struct frame *f);
extern void bset_redisplay (struct buffer *b);
extern void bset_update_mode_line (struct buffer *b);
+extern void maybe_set_redisplay (Lisp_Object);
/* Call this to tell redisplay to look for other windows than selected-window
that need to be redisplayed. Calling one of the *set_redisplay functions
above already does it, so it's only needed in unusual cases. */
b->text->redisplay = true;
}
+void
+maybe_set_redisplay (Lisp_Object symbol)
+{
+ if (!NILP (Fassoc_string (symbol, Vredisplay__variables, Qnil)))
+ {
+ bset_update_mode_line (current_buffer);
+ current_buffer->prevent_redisplay_optimizations_p = true;
+ }
+}
+
#ifdef GLYPH_DEBUG
/* True means print traces of redisplay if compiled with
DEFVAR_LISP ("redisplay--mode-lines-cause", Vredisplay__mode_lines_cause,
doc: /* */);
Vredisplay__mode_lines_cause = Fmake_hash_table (0, NULL);
+
+ DEFVAR_LISP ("redisplay--variables", Vredisplay__variables,
+ doc: /* A list of variables changes to which trigger a thorough redisplay. */);
+ Vredisplay__variables = Qnil;
}