aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2017-02-23 21:17:04 -0500
committerStefan Monnier2017-02-23 21:17:04 -0500
commitdee8674414fae2323fd9cbf05aa762e72fa575e5 (patch)
treebe73485bfd517dad1553dac6bf877b4e59a1e6a9 /src
parent407e650413c0296f5873a1399c2306b25f81f310 (diff)
downloademacs-dee8674414fae2323fd9cbf05aa762e72fa575e5.tar.gz
emacs-dee8674414fae2323fd9cbf05aa762e72fa575e5.zip
Minor redisplay optimisations
* src/frame.c (Ficonify_frame): No need to redisplay everything. * src/xdisp.c (overlay_arrows_changed_p): Add `set_redisplay' argument. (redisplay_internal): Use it to avoid redisplaying everything. (try_window_id): Use it keep the same behavior as before.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c3
-rw-r--r--src/xdisp.c18
2 files changed, 11 insertions, 10 deletions
diff --git a/src/frame.c b/src/frame.c
index d0f653fc762..5e1e2f19906 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2156,9 +2156,6 @@ If omitted, FRAME defaults to the currently selected frame. */)
2156#endif 2156#endif
2157 } 2157 }
2158 2158
2159 /* Make menu bar update for the Buffers and Frames menus. */
2160 windows_or_buffers_changed = 17;
2161
2162 return Qnil; 2159 return Qnil;
2163} 2160}
2164 2161
diff --git a/src/xdisp.c b/src/xdisp.c
index e59934d2d5a..b0ff627c70e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13336,7 +13336,7 @@ overlay_arrow_in_current_buffer_p (void)
13336 has changed. */ 13336 has changed. */
13337 13337
13338static bool 13338static bool
13339overlay_arrows_changed_p (void) 13339overlay_arrows_changed_p (bool set_redisplay)
13340{ 13340{
13341 Lisp_Object vlist; 13341 Lisp_Object vlist;
13342 13342
@@ -13356,7 +13356,12 @@ overlay_arrows_changed_p (void)
13356 Fget (var, Qlast_arrow_position)) 13356 Fget (var, Qlast_arrow_position))
13357 || ! (pstr = overlay_arrow_string_or_property (var), 13357 || ! (pstr = overlay_arrow_string_or_property (var),
13358 EQ (pstr, Fget (var, Qlast_arrow_string)))) 13358 EQ (pstr, Fget (var, Qlast_arrow_string))))
13359 return true; 13359 {
13360 if (set_redisplay)
13361 bset_redisplay (XMARKER (val)->buffer);
13362 else
13363 return true;
13364 }
13360 } 13365 }
13361 return false; 13366 return false;
13362} 13367}
@@ -13781,10 +13786,9 @@ redisplay_internal (void)
13781 13786
13782 /* If specs for an arrow have changed, do thorough redisplay 13787 /* If specs for an arrow have changed, do thorough redisplay
13783 to ensure we remove any arrow that should no longer exist. */ 13788 to ensure we remove any arrow that should no longer exist. */
13784 if (overlay_arrows_changed_p ()) 13789 /* Apparently, this is the only case where we update other windows,
13785 /* Apparently, this is the only case where we update other windows, 13790 without updating other mode-lines. */
13786 without updating other mode-lines. */ 13791 overlay_arrows_changed_p (true);
13787 windows_or_buffers_changed = 49;
13788 13792
13789 consider_all_windows_p = (update_mode_lines 13793 consider_all_windows_p = (update_mode_lines
13790 || windows_or_buffers_changed); 13794 || windows_or_buffers_changed);
@@ -18282,7 +18286,7 @@ try_window_id (struct window *w)
18282 18286
18283 /* Can't use this if overlay arrow position and/or string have 18287 /* Can't use this if overlay arrow position and/or string have
18284 changed. */ 18288 changed. */
18285 if (overlay_arrows_changed_p ()) 18289 if (overlay_arrows_changed_p (false))
18286 GIVE_UP (12); 18290 GIVE_UP (12);
18287 18291
18288 /* When word-wrap is on, adding a space to the first word of a 18292 /* When word-wrap is on, adding a space to the first word of a