diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-12-15 15:41:11 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-12-15 15:41:11 -0500 |
commit | 07e47aad41e6d350b13531bf8a5eebd042f34794 (patch) | |
tree | ad3cebab2646abd67a7a4f5016263c20173a5eb8 /src/dispnew.c | |
parent | 816c1dfc5dfc6d490c653b393ef6876b3f04b7fe (diff) | |
download | emacs-07e47aad41e6d350b13531bf8a5eebd042f34794.tar.gz |
* src/: Various fixes to use bool type and constants.
* src/dispnew.c (update_single_window): Remove arg `force_p' since it's
always true.
* src/xfaces.c (clear_face_cache): Use bool for the argument type.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index d50d06f2d47..a68901acd57 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -3051,10 +3051,10 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p) struct window *root_window = XWINDOW (f->root_window); if (redisplay_dont_pause) - force_p = 1; + force_p = true; else if (!force_p && detect_input_pending_ignore_squeezables ()) { - paused_p = 1; + paused_p = true; goto do_pause; } @@ -3074,7 +3074,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p) /* Update the menu bar on X frames that don't have toolkit support. */ if (WINDOWP (f->menu_bar_window)) - update_window (XWINDOW (f->menu_bar_window), 1); + update_window (XWINDOW (f->menu_bar_window), true); #endif #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) @@ -3088,7 +3088,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p) { Lisp_Object tem; - update_window (w, 1); + update_window (w, true); w->must_be_updated_p = false; /* Swap tool-bar strings. We swap because we want to @@ -3113,7 +3113,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p) /* Build F's desired matrix from window matrices. */ build_frame_matrix (f); - /* Update the display */ + /* Update the display. */ update_begin (f); paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1); update_end (f); @@ -3225,7 +3225,7 @@ update_window_tree (struct window *w, bool force_p) If FORCE_P, don't stop updating if input is pending. */ void -update_single_window (struct window *w, bool force_p) +update_single_window (struct window *w) { if (w->must_be_updated_p) { @@ -3234,12 +3234,9 @@ update_single_window (struct window *w, bool force_p) /* Record that this is not a frame-based redisplay. */ set_frame_matrix_frame (NULL); - if (redisplay_dont_pause) - force_p = 1; - /* Update W. */ update_begin (f); - update_window (w, force_p); + update_window (w, true); update_end (f); /* Reset flag in W. */ @@ -6267,8 +6264,15 @@ See `buffer-display-table' for more information. */); Vstandard_display_table = Qnil; DEFVAR_BOOL ("redisplay-dont-pause", redisplay_dont_pause, - doc: /* Non-nil means display update isn't paused when input is detected. */); - redisplay_dont_pause = 1; + doc: /* Nil means display update is paused when input is detected. */); + /* Contrary to expectations, a value of "false" can be detrimental to + responsiveness since aborting a redisplay throws away some of the + work already performed. It's usually more efficient (and gives + more prompt feedback to the user) to let the redisplay terminate, + and just completely skip the next command's redisplay (which is + done regardless of this setting if there's pending input at the + beginning of the next redisplay). */ + redisplay_dont_pause = true; #ifdef CANNOT_DUMP if (noninteractive) |