aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2013-01-29 00:03:33 +0100
committerJoakim Verona2013-01-29 00:03:33 +0100
commit8baa84f464c72cfcd08f43a9b7a1f092ed0c03a2 (patch)
tree7305a3981842ec5580e547f18634f668222794d4 /src
parent7a87fee72cf24500ee9e7f0b4a3effe77e2b3a53 (diff)
parentb2dc4f52e73593ec205c30324247b56257842b77 (diff)
downloademacs-8baa84f464c72cfcd08f43a9b7a1f092ed0c03a2.tar.gz
emacs-8baa84f464c72cfcd08f43a9b7a1f092ed0c03a2.zip
auto upstream
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog14
-rw-r--r--src/dispnew.c78
-rw-r--r--src/w32.c2
3 files changed, 18 insertions, 76 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e147889f796..abbe4ed6dd4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,17 @@
12013-01-28 Eli Zaretskii <eliz@gnu.org>
2
3 * w32.c (opendir): Now accepts a 'const char *'.
4
52013-01-28 Dmitry Antipov <dmantipov@yandex.ru>
6
7 Remove obsolete redisplay code. See the discussion at
8 http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html.
9 * dispnew.c (preemption_period, preemption_next_check): Remove.
10 (Vredisplay_preemption_period): Likewise.
11 (update_frame, update_single_window, update_window, update_frame_1):
12 Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not
13 used, following the 2012-06-22 change.
14
12013-01-25 Eli Zaretskii <eliz@gnu.org> 152013-01-25 Eli Zaretskii <eliz@gnu.org>
2 16
3 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540) 17 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540)
diff --git a/src/dispnew.c b/src/dispnew.c
index a680ca0e03a..0037c0269de 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -110,12 +110,6 @@ static void set_window_cursor_after_update (struct window *);
110static void adjust_frame_glyphs_for_window_redisplay (struct frame *); 110static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
111static void adjust_frame_glyphs_for_frame_redisplay (struct frame *); 111static void adjust_frame_glyphs_for_frame_redisplay (struct frame *);
112 112
113
114/* Redisplay preemption timers. */
115
116static EMACS_TIME preemption_period;
117static EMACS_TIME preemption_next_check;
118
119/* True upon entry to redisplay means do not assume anything about 113/* True upon entry to redisplay means do not assume anything about
120 current contents of actual terminal frame; clear and redraw it. */ 114 current contents of actual terminal frame; clear and redraw it. */
121 115
@@ -3082,21 +3076,10 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
3082 3076
3083 if (redisplay_dont_pause) 3077 if (redisplay_dont_pause)
3084 force_p = 1; 3078 force_p = 1;
3085 else if (NILP (Vredisplay_preemption_period)) 3079 else if (!force_p && detect_input_pending_ignore_squeezables ())
3086 force_p = 1;
3087 else if (!force_p && NUMBERP (Vredisplay_preemption_period))
3088 { 3080 {
3089 double p = XFLOATINT (Vredisplay_preemption_period); 3081 paused_p = 1;
3090 3082 goto do_pause;
3091 if (detect_input_pending_ignore_squeezables ())
3092 {
3093 paused_p = 1;
3094 goto do_pause;
3095 }
3096
3097 preemption_period = EMACS_TIME_FROM_DOUBLE (p);
3098 preemption_next_check = add_emacs_time (current_emacs_time (),
3099 preemption_period);
3100 } 3083 }
3101 3084
3102 if (FRAME_WINDOW_P (f)) 3085 if (FRAME_WINDOW_P (f))
@@ -3234,15 +3217,6 @@ update_single_window (struct window *w, bool force_p)
3234 3217
3235 if (redisplay_dont_pause) 3218 if (redisplay_dont_pause)
3236 force_p = 1; 3219 force_p = 1;
3237 else if (NILP (Vredisplay_preemption_period))
3238 force_p = 1;
3239 else if (!force_p && NUMBERP (Vredisplay_preemption_period))
3240 {
3241 double p = XFLOATINT (Vredisplay_preemption_period);
3242 preemption_period = EMACS_TIME_FROM_DOUBLE (p);
3243 preemption_next_check = add_emacs_time (current_emacs_time (),
3244 preemption_period);
3245 }
3246 3220
3247 /* Update W. */ 3221 /* Update W. */
3248 update_begin (f); 3222 update_begin (f);
@@ -3396,9 +3370,7 @@ update_window (struct window *w, bool force_p)
3396{ 3370{
3397 struct glyph_matrix *desired_matrix = w->desired_matrix; 3371 struct glyph_matrix *desired_matrix = w->desired_matrix;
3398 bool paused_p; 3372 bool paused_p;
3399#if !PERIODIC_PREEMPTION_CHECKING
3400 int preempt_count = baud_rate / 2400 + 1; 3373 int preempt_count = baud_rate / 2400 + 1;
3401#endif
3402 struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); 3374 struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w)));
3403#ifdef GLYPH_DEBUG 3375#ifdef GLYPH_DEBUG
3404 /* Check that W's frame doesn't have glyph matrices. */ 3376 /* Check that W's frame doesn't have glyph matrices. */
@@ -3406,10 +3378,8 @@ update_window (struct window *w, bool force_p)
3406#endif 3378#endif
3407 3379
3408 /* Check pending input the first time so that we can quickly return. */ 3380 /* Check pending input the first time so that we can quickly return. */
3409#if !PERIODIC_PREEMPTION_CHECKING
3410 if (!force_p) 3381 if (!force_p)
3411 detect_input_pending_ignore_squeezables (); 3382 detect_input_pending_ignore_squeezables ();
3412#endif
3413 3383
3414 /* If forced to complete the update, or if no input is pending, do 3384 /* If forced to complete the update, or if no input is pending, do
3415 the update. */ 3385 the update. */
@@ -3420,9 +3390,7 @@ update_window (struct window *w, bool force_p)
3420 struct glyph_row *header_line_row; 3390 struct glyph_row *header_line_row;
3421 int yb; 3391 int yb;
3422 bool changed_p = 0, mouse_face_overwritten_p = 0; 3392 bool changed_p = 0, mouse_face_overwritten_p = 0;
3423#if ! PERIODIC_PREEMPTION_CHECKING
3424 int n_updated = 0; 3393 int n_updated = 0;
3425#endif
3426 3394
3427 rif->update_window_begin_hook (w); 3395 rif->update_window_begin_hook (w);
3428 yb = window_text_bottom_y (w); 3396 yb = window_text_bottom_y (w);
@@ -3486,22 +3454,8 @@ update_window (struct window *w, bool force_p)
3486 detect_input_pending. If it's done too often, 3454 detect_input_pending. If it's done too often,
3487 scrolling large windows with repeated scroll-up 3455 scrolling large windows with repeated scroll-up
3488 commands will too quickly pause redisplay. */ 3456 commands will too quickly pause redisplay. */
3489#if PERIODIC_PREEMPTION_CHECKING
3490 if (!force_p)
3491 {
3492 EMACS_TIME tm = current_emacs_time ();
3493 if (EMACS_TIME_LT (preemption_next_check, tm))
3494 {
3495 preemption_next_check = add_emacs_time (tm,
3496 preemption_period);
3497 if (detect_input_pending_ignore_squeezables ())
3498 break;
3499 }
3500 }
3501#else
3502 if (!force_p && ++n_updated % preempt_count == 0) 3457 if (!force_p && ++n_updated % preempt_count == 0)
3503 detect_input_pending_ignore_squeezables (); 3458 detect_input_pending_ignore_squeezables ();
3504#endif
3505 changed_p |= update_window_line (w, vpos, 3459 changed_p |= update_window_line (w, vpos,
3506 &mouse_face_overwritten_p); 3460 &mouse_face_overwritten_p);
3507 3461
@@ -4542,13 +4496,11 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p)
4542 if (preempt_count <= 0) 4496 if (preempt_count <= 0)
4543 preempt_count = 1; 4497 preempt_count = 1;
4544 4498
4545#if !PERIODIC_PREEMPTION_CHECKING
4546 if (!force_p && detect_input_pending_ignore_squeezables ()) 4499 if (!force_p && detect_input_pending_ignore_squeezables ())
4547 { 4500 {
4548 pause_p = 1; 4501 pause_p = 1;
4549 goto do_pause; 4502 goto do_pause;
4550 } 4503 }
4551#endif
4552 4504
4553 /* If we cannot insert/delete lines, it's no use trying it. */ 4505 /* If we cannot insert/delete lines, it's no use trying it. */
4554 if (!FRAME_LINE_INS_DEL_OK (f)) 4506 if (!FRAME_LINE_INS_DEL_OK (f))
@@ -4589,21 +4541,8 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p)
4589 } 4541 }
4590 } 4542 }
4591 4543
4592#if PERIODIC_PREEMPTION_CHECKING
4593 if (!force_p)
4594 {
4595 EMACS_TIME tm = current_emacs_time ();
4596 if (EMACS_TIME_LT (preemption_next_check, tm))
4597 {
4598 preemption_next_check = add_emacs_time (tm, preemption_period);
4599 if (detect_input_pending_ignore_squeezables ())
4600 break;
4601 }
4602 }
4603#else
4604 if (!force_p && (i - 1) % preempt_count == 0) 4544 if (!force_p && (i - 1) % preempt_count == 0)
4605 detect_input_pending_ignore_squeezables (); 4545 detect_input_pending_ignore_squeezables ();
4606#endif
4607 4546
4608 update_frame_line (f, i); 4547 update_frame_line (f, i);
4609 } 4548 }
@@ -4709,9 +4648,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p)
4709 } 4648 }
4710 } 4649 }
4711 4650
4712#if !PERIODIC_PREEMPTION_CHECKING
4713 do_pause: 4651 do_pause:
4714#endif
4715 4652
4716 clear_desired_matrices (f); 4653 clear_desired_matrices (f);
4717 return pause_p; 4654 return pause_p;
@@ -6421,15 +6358,6 @@ See `buffer-display-table' for more information. */);
6421 doc: /* Non-nil means display update isn't paused when input is detected. */); 6358 doc: /* Non-nil means display update isn't paused when input is detected. */);
6422 redisplay_dont_pause = 1; 6359 redisplay_dont_pause = 1;
6423 6360
6424#if PERIODIC_PREEMPTION_CHECKING
6425 DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period,
6426 doc: /* Period in seconds between checking for input during redisplay.
6427This has an effect only if `redisplay-dont-pause' is nil; in that
6428case, arriving input preempts redisplay until the input is processed.
6429If the value is nil, redisplay is never preempted. */);
6430 Vredisplay_preemption_period = make_float (0.10);
6431#endif
6432
6433#ifdef CANNOT_DUMP 6361#ifdef CANNOT_DUMP
6434 if (noninteractive) 6362 if (noninteractive)
6435#endif 6363#endif
diff --git a/src/w32.c b/src/w32.c
index f722bc5f397..6bcc8e19278 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -2809,7 +2809,7 @@ static char *read_unc_volume (HANDLE, char *, int);
2809static void close_unc_volume (HANDLE); 2809static void close_unc_volume (HANDLE);
2810 2810
2811DIR * 2811DIR *
2812opendir (char *filename) 2812opendir (const char *filename)
2813{ 2813{
2814 DIR *dirp; 2814 DIR *dirp;
2815 2815