aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-02-25 06:44:48 +0000
committerRichard M. Stallman1996-02-25 06:44:48 +0000
commite9874cee56a1bb9cd976acb615aaad5ad02c91b5 (patch)
treeb0c599175f6f1569e7f693485274a15270abd5a8 /src
parent0f86732408ad765d574befb3f0a0ea69dbb92a83 (diff)
downloademacs-e9874cee56a1bb9cd976acb615aaad5ad02c91b5.tar.gz
emacs-e9874cee56a1bb9cd976acb615aaad5ad02c91b5.zip
(redisplay_internal): Renamed from redisplay.
New arg PRESERVE_ECHO_AREA. (redisplay): New wrapper function calls redisplay_internal. (redisplay_window, redisplay_windows): New arg PRESERVE_ECHO_AREA.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c42
1 files changed, 32 insertions, 10 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 7fc3425dc0d..b1a6e35ccbd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -159,6 +159,7 @@ static int debug_end_pos;
159/* Nonzero means display mode line highlighted */ 159/* Nonzero means display mode line highlighted */
160int mode_line_inverse_video; 160int mode_line_inverse_video;
161 161
162static void redisplay_internal ();
162static int message_log_check_duplicate (); 163static int message_log_check_duplicate ();
163static void echo_area_display (); 164static void echo_area_display ();
164void mark_window_display_accurate (); 165void mark_window_display_accurate ();
@@ -808,6 +809,18 @@ static FRAME_PTR previous_terminal_frame;
808void 809void
809redisplay () 810redisplay ()
810{ 811{
812 redisplay_internal (0);
813}
814
815/* If PRESERVE_ECHO_AREA is nonzero, it means this redisplay
816 is not in response to any user action; therefore, we should
817 preserve the echo area. Perhaps in the future avoid recentering windows
818 if it is not necessary; currently that causes some problems. */
819
820static void
821redisplay_internal (preserve_echo_area)
822 int preserve_echo_area;
823{
811 register struct window *w = XWINDOW (selected_window); 824 register struct window *w = XWINDOW (selected_window);
812 register int pause; 825 register int pause;
813 int must_finish = 0; 826 int must_finish = 0;
@@ -1068,7 +1081,7 @@ redisplay ()
1068 (*condemn_scroll_bars_hook) (f); 1081 (*condemn_scroll_bars_hook) (f);
1069 1082
1070 if (FRAME_VISIBLE_P (f)) 1083 if (FRAME_VISIBLE_P (f))
1071 redisplay_windows (FRAME_ROOT_WINDOW (f)); 1084 redisplay_windows (FRAME_ROOT_WINDOW (f), preserve_echo_area);
1072 1085
1073 /* Any scroll bars which redisplay_windows should have nuked 1086 /* Any scroll bars which redisplay_windows should have nuked
1074 should now go away. */ 1087 should now go away. */
@@ -1079,7 +1092,7 @@ redisplay ()
1079 } 1092 }
1080 else if (FRAME_VISIBLE_P (selected_frame)) 1093 else if (FRAME_VISIBLE_P (selected_frame))
1081 { 1094 {
1082 redisplay_window (selected_window, 1); 1095 redisplay_window (selected_window, 1, preserve_echo_area);
1083 if (XFASTINT (w->width) != FRAME_WIDTH (selected_frame)) 1096 if (XFASTINT (w->width) != FRAME_WIDTH (selected_frame))
1084 preserve_other_columns (w); 1097 preserve_other_columns (w);
1085 } 1098 }
@@ -1233,11 +1246,11 @@ redisplay_preserve_echo_area ()
1233 if (echo_area_glyphs == 0 && previous_echo_glyphs != 0) 1246 if (echo_area_glyphs == 0 && previous_echo_glyphs != 0)
1234 { 1247 {
1235 echo_area_glyphs = previous_echo_glyphs; 1248 echo_area_glyphs = previous_echo_glyphs;
1236 redisplay (); 1249 redisplay_internal (1);
1237 echo_area_glyphs = 0; 1250 echo_area_glyphs = 0;
1238 } 1251 }
1239 else 1252 else
1240 redisplay (); 1253 redisplay_internal (1);
1241} 1254}
1242 1255
1243void 1256void
@@ -1371,19 +1384,20 @@ int do_id = 1;
1371/* Redisplay WINDOW and its subwindows and siblings. */ 1384/* Redisplay WINDOW and its subwindows and siblings. */
1372 1385
1373static void 1386static void
1374redisplay_windows (window) 1387redisplay_windows (window, preserve_echo_area)
1375 Lisp_Object window; 1388 Lisp_Object window;
1389 int preserve_echo_area;
1376{ 1390{
1377 for (; !NILP (window); window = XWINDOW (window)->next) 1391 for (; !NILP (window); window = XWINDOW (window)->next)
1378 redisplay_window (window, 0); 1392 redisplay_window (window, 0, preserve_echo_area);
1379} 1393}
1380 1394
1381/* Redisplay window WINDOW and its subwindows. */ 1395/* Redisplay window WINDOW and its subwindows. */
1382 1396
1383static void 1397static void
1384redisplay_window (window, just_this_one) 1398redisplay_window (window, just_this_one, preserve_echo_area)
1385 Lisp_Object window; 1399 Lisp_Object window;
1386 int just_this_one; 1400 int just_this_one, preserve_echo_area;
1387{ 1401{
1388 register struct window *w = XWINDOW (window); 1402 register struct window *w = XWINDOW (window);
1389 FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); 1403 FRAME_PTR f = XFRAME (WINDOW_FRAME (w));
@@ -1679,8 +1693,16 @@ redisplay_window (window, just_this_one)
1679 goto done; 1693 goto done;
1680 } 1694 }
1681 else if (startp >= BEGV && startp <= ZV 1695 else if (startp >= BEGV && startp <= ZV
1682 /* Avoid starting display at end of buffer! */ 1696 && (startp < ZV
1683 && (startp < ZV || startp == BEGV 1697 /* Avoid starting at end of buffer. */
1698#if 0 /* This change causes trouble for M-! finger & RET.
1699 It will have to be considered later. */
1700 || ! EQ (window, selected_window)
1701 /* Don't do the recentering if redisplay
1702 is not for no user action. */
1703 || preserve_echo_area
1704#endif
1705 || startp == BEGV
1684 || (XFASTINT (w->last_modified) >= MODIFF))) 1706 || (XFASTINT (w->last_modified) >= MODIFF)))
1685 { 1707 {
1686 /* Try to redisplay starting at same place as before */ 1708 /* Try to redisplay starting at same place as before */