aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/dispnew.c78
2 files changed, 13 insertions, 75 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e147889f796..221d525f16e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12013-01-28 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Remove obsolete redisplay code. See the discussion at
4 http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html.
5 * dispnew.c (preemption_period, preemption_next_check): Remove.
6 (Vredisplay_preemption_period): Likewise.
7 (update_frame, update_single_window, update_window, update_frame_1):
8 Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not
9 used, following the 2012-06-22 change.
10
12013-01-25 Eli Zaretskii <eliz@gnu.org> 112013-01-25 Eli Zaretskii <eliz@gnu.org>
2 12
3 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540) 13 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540)
diff --git a/src/dispnew.c b/src/dispnew.c
index 259d4c9b42c..5e480d4c6f4 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -107,12 +107,6 @@ static void set_window_cursor_after_update (struct window *);
107static void adjust_frame_glyphs_for_window_redisplay (struct frame *); 107static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
108static void adjust_frame_glyphs_for_frame_redisplay (struct frame *); 108static void adjust_frame_glyphs_for_frame_redisplay (struct frame *);
109 109
110
111/* Redisplay preemption timers. */
112
113static EMACS_TIME preemption_period;
114static EMACS_TIME preemption_next_check;
115
116/* True upon entry to redisplay means do not assume anything about 110/* True upon entry to redisplay means do not assume anything about
117 current contents of actual terminal frame; clear and redraw it. */ 111 current contents of actual terminal frame; clear and redraw it. */
118 112
@@ -3080,21 +3074,10 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
3080 3074
3081 if (redisplay_dont_pause) 3075 if (redisplay_dont_pause)
3082 force_p = 1; 3076 force_p = 1;
3083 else if (NILP (Vredisplay_preemption_period)) 3077 else if (!force_p && detect_input_pending_ignore_squeezables ())
3084 force_p = 1;
3085 else if (!force_p && NUMBERP (Vredisplay_preemption_period))
3086 { 3078 {
3087 double p = XFLOATINT (Vredisplay_preemption_period); 3079 paused_p = 1;
3088 3080 goto do_pause;
3089 if (detect_input_pending_ignore_squeezables ())
3090 {
3091 paused_p = 1;
3092 goto do_pause;
3093 }
3094
3095 preemption_period = EMACS_TIME_FROM_DOUBLE (p);
3096 preemption_next_check = add_emacs_time (current_emacs_time (),
3097 preemption_period);
3098 } 3081 }
3099 3082
3100 if (FRAME_WINDOW_P (f)) 3083 if (FRAME_WINDOW_P (f))
@@ -3232,15 +3215,6 @@ update_single_window (struct window *w, bool force_p)
3232 3215
3233 if (redisplay_dont_pause) 3216 if (redisplay_dont_pause)
3234 force_p = 1; 3217 force_p = 1;
3235 else if (NILP (Vredisplay_preemption_period))
3236 force_p = 1;
3237 else if (!force_p && NUMBERP (Vredisplay_preemption_period))
3238 {
3239 double p = XFLOATINT (Vredisplay_preemption_period);
3240 preemption_period = EMACS_TIME_FROM_DOUBLE (p);
3241 preemption_next_check = add_emacs_time (current_emacs_time (),
3242 preemption_period);
3243 }
3244 3218
3245 /* Update W. */ 3219 /* Update W. */
3246 update_begin (f); 3220 update_begin (f);
@@ -3394,9 +3368,7 @@ update_window (struct window *w, bool force_p)
3394{ 3368{
3395 struct glyph_matrix *desired_matrix = w->desired_matrix; 3369 struct glyph_matrix *desired_matrix = w->desired_matrix;
3396 bool paused_p; 3370 bool paused_p;
3397#if !PERIODIC_PREEMPTION_CHECKING
3398 int preempt_count = baud_rate / 2400 + 1; 3371 int preempt_count = baud_rate / 2400 + 1;
3399#endif
3400 struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); 3372 struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w)));
3401#ifdef GLYPH_DEBUG 3373#ifdef GLYPH_DEBUG
3402 /* Check that W's frame doesn't have glyph matrices. */ 3374 /* Check that W's frame doesn't have glyph matrices. */
@@ -3404,10 +3376,8 @@ update_window (struct window *w, bool force_p)
3404#endif 3376#endif
3405 3377
3406 /* Check pending input the first time so that we can quickly return. */ 3378 /* Check pending input the first time so that we can quickly return. */
3407#if !PERIODIC_PREEMPTION_CHECKING
3408 if (!force_p) 3379 if (!force_p)
3409 detect_input_pending_ignore_squeezables (); 3380 detect_input_pending_ignore_squeezables ();
3410#endif
3411 3381
3412 /* If forced to complete the update, or if no input is pending, do 3382 /* If forced to complete the update, or if no input is pending, do
3413 the update. */ 3383 the update. */
@@ -3418,9 +3388,7 @@ update_window (struct window *w, bool force_p)
3418 struct glyph_row *header_line_row; 3388 struct glyph_row *header_line_row;
3419 int yb; 3389 int yb;
3420 bool changed_p = 0, mouse_face_overwritten_p = 0; 3390 bool changed_p = 0, mouse_face_overwritten_p = 0;
3421#if ! PERIODIC_PREEMPTION_CHECKING
3422 int n_updated = 0; 3391 int n_updated = 0;
3423#endif
3424 3392
3425 rif->update_window_begin_hook (w); 3393 rif->update_window_begin_hook (w);
3426 yb = window_text_bottom_y (w); 3394 yb = window_text_bottom_y (w);
@@ -3484,22 +3452,8 @@ update_window (struct window *w, bool force_p)
3484 detect_input_pending. If it's done too often, 3452 detect_input_pending. If it's done too often,
3485 scrolling large windows with repeated scroll-up 3453 scrolling large windows with repeated scroll-up
3486 commands will too quickly pause redisplay. */ 3454 commands will too quickly pause redisplay. */
3487#if PERIODIC_PREEMPTION_CHECKING
3488 if (!force_p)
3489 {
3490 EMACS_TIME tm = current_emacs_time ();
3491 if (EMACS_TIME_LT (preemption_next_check, tm))
3492 {
3493 preemption_next_check = add_emacs_time (tm,
3494 preemption_period);
3495 if (detect_input_pending_ignore_squeezables ())
3496 break;
3497 }
3498 }
3499#else
3500 if (!force_p && ++n_updated % preempt_count == 0) 3455 if (!force_p && ++n_updated % preempt_count == 0)
3501 detect_input_pending_ignore_squeezables (); 3456 detect_input_pending_ignore_squeezables ();
3502#endif
3503 changed_p |= update_window_line (w, vpos, 3457 changed_p |= update_window_line (w, vpos,
3504 &mouse_face_overwritten_p); 3458 &mouse_face_overwritten_p);
3505 3459
@@ -4531,13 +4485,11 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p)
4531 if (preempt_count <= 0) 4485 if (preempt_count <= 0)
4532 preempt_count = 1; 4486 preempt_count = 1;
4533 4487
4534#if !PERIODIC_PREEMPTION_CHECKING
4535 if (!force_p && detect_input_pending_ignore_squeezables ()) 4488 if (!force_p && detect_input_pending_ignore_squeezables ())
4536 { 4489 {
4537 pause_p = 1; 4490 pause_p = 1;
4538 goto do_pause; 4491 goto do_pause;
4539 } 4492 }
4540#endif
4541 4493
4542 /* If we cannot insert/delete lines, it's no use trying it. */ 4494 /* If we cannot insert/delete lines, it's no use trying it. */
4543 if (!FRAME_LINE_INS_DEL_OK (f)) 4495 if (!FRAME_LINE_INS_DEL_OK (f))
@@ -4578,21 +4530,8 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p)
4578 } 4530 }
4579 } 4531 }
4580 4532
4581#if PERIODIC_PREEMPTION_CHECKING
4582 if (!force_p)
4583 {
4584 EMACS_TIME tm = current_emacs_time ();
4585 if (EMACS_TIME_LT (preemption_next_check, tm))
4586 {
4587 preemption_next_check = add_emacs_time (tm, preemption_period);
4588 if (detect_input_pending_ignore_squeezables ())
4589 break;
4590 }
4591 }
4592#else
4593 if (!force_p && (i - 1) % preempt_count == 0) 4533 if (!force_p && (i - 1) % preempt_count == 0)
4594 detect_input_pending_ignore_squeezables (); 4534 detect_input_pending_ignore_squeezables ();
4595#endif
4596 4535
4597 update_frame_line (f, i); 4536 update_frame_line (f, i);
4598 } 4537 }
@@ -4698,9 +4637,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p)
4698 } 4637 }
4699 } 4638 }
4700 4639
4701#if !PERIODIC_PREEMPTION_CHECKING
4702 do_pause: 4640 do_pause:
4703#endif
4704 4641
4705 clear_desired_matrices (f); 4642 clear_desired_matrices (f);
4706 return pause_p; 4643 return pause_p;
@@ -6410,15 +6347,6 @@ See `buffer-display-table' for more information. */);
6410 doc: /* Non-nil means display update isn't paused when input is detected. */); 6347 doc: /* Non-nil means display update isn't paused when input is detected. */);
6411 redisplay_dont_pause = 1; 6348 redisplay_dont_pause = 1;
6412 6349
6413#if PERIODIC_PREEMPTION_CHECKING
6414 DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period,
6415 doc: /* Period in seconds between checking for input during redisplay.
6416This has an effect only if `redisplay-dont-pause' is nil; in that
6417case, arriving input preempts redisplay until the input is processed.
6418If the value is nil, redisplay is never preempted. */);
6419 Vredisplay_preemption_period = make_float (0.10);
6420#endif
6421
6422#ifdef CANNOT_DUMP 6350#ifdef CANNOT_DUMP
6423 if (noninteractive) 6351 if (noninteractive)
6424#endif 6352#endif