aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-11-06 21:21:52 +0200
committerEli Zaretskii2015-11-06 21:21:52 +0200
commit19e09cfab61436cb4590303871a31ee07624f5ab (patch)
treed3c2a351783b2d0a9c58e513c76b5c7cc58b082b /src
parent8025fdbbea6eaaa3e1290864fe2dc48e2201df48 (diff)
downloademacs-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 'src')
-rw-r--r--src/data.c1
-rw-r--r--src/window.h1
-rw-r--r--src/xdisp.c14
3 files changed, 16 insertions, 0 deletions
diff --git a/src/data.c b/src/data.c
index 5382b01066e..4db93f5625f 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1240,6 +1240,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
1240 return; 1240 return;
1241 } 1241 }
1242 1242
1243 maybe_set_redisplay (symbol);
1243 sym = XSYMBOL (symbol); 1244 sym = XSYMBOL (symbol);
1244 1245
1245 start: 1246 start:
diff --git a/src/window.h b/src/window.h
index eaff57eaedf..135f5de7d8a 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1056,6 +1056,7 @@ extern void wset_redisplay (struct window *w);
1056extern void fset_redisplay (struct frame *f); 1056extern void fset_redisplay (struct frame *f);
1057extern void bset_redisplay (struct buffer *b); 1057extern void bset_redisplay (struct buffer *b);
1058extern void bset_update_mode_line (struct buffer *b); 1058extern void bset_update_mode_line (struct buffer *b);
1059extern void maybe_set_redisplay (Lisp_Object);
1059/* Call this to tell redisplay to look for other windows than selected-window 1060/* Call this to tell redisplay to look for other windows than selected-window
1060 that need to be redisplayed. Calling one of the *set_redisplay functions 1061 that need to be redisplayed. Calling one of the *set_redisplay functions
1061 above already does it, so it's only needed in unusual cases. */ 1062 above already does it, so it's only needed in unusual cases. */
diff --git a/src/xdisp.c b/src/xdisp.c
index bdf2d09179e..f6d63ea702f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -620,6 +620,16 @@ bset_update_mode_line (struct buffer *b)
620 b->text->redisplay = true; 620 b->text->redisplay = true;
621} 621}
622 622
623void
624maybe_set_redisplay (Lisp_Object symbol)
625{
626 if (!NILP (Fassoc_string (symbol, Vredisplay__variables, Qnil)))
627 {
628 bset_update_mode_line (current_buffer);
629 current_buffer->prevent_redisplay_optimizations_p = true;
630 }
631}
632
623#ifdef GLYPH_DEBUG 633#ifdef GLYPH_DEBUG
624 634
625/* True means print traces of redisplay if compiled with 635/* True means print traces of redisplay if compiled with
@@ -31465,6 +31475,10 @@ display table takes effect; in this case, Emacs does not consult
31465 DEFVAR_LISP ("redisplay--mode-lines-cause", Vredisplay__mode_lines_cause, 31475 DEFVAR_LISP ("redisplay--mode-lines-cause", Vredisplay__mode_lines_cause,
31466 doc: /* */); 31476 doc: /* */);
31467 Vredisplay__mode_lines_cause = Fmake_hash_table (0, NULL); 31477 Vredisplay__mode_lines_cause = Fmake_hash_table (0, NULL);
31478
31479 DEFVAR_LISP ("redisplay--variables", Vredisplay__variables,
31480 doc: /* A list of variables changes to which trigger a thorough redisplay. */);
31481 Vredisplay__variables = Qnil;
31468} 31482}
31469 31483
31470 31484