diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 2 | ||||
| -rw-r--r-- | src/keyboard.h | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 14 |
3 files changed, 16 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index d2f0cb405f0..cf15cd73572 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -285,7 +285,7 @@ bool input_pending; | |||
| 285 | with the input rate, but if it can keep up just enough that there's no | 285 | with the input rate, but if it can keep up just enough that there's no |
| 286 | input_pending when we begin the command, then redisplay is not skipped | 286 | input_pending when we begin the command, then redisplay is not skipped |
| 287 | which results in better feedback to the user. */ | 287 | which results in better feedback to the user. */ |
| 288 | static bool input_was_pending; | 288 | bool input_was_pending; |
| 289 | 289 | ||
| 290 | /* Circular buffer for pre-read keyboard input. */ | 290 | /* Circular buffer for pre-read keyboard input. */ |
| 291 | 291 | ||
diff --git a/src/keyboard.h b/src/keyboard.h index 91c6f4604f9..8bdffaa2bff 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -432,7 +432,7 @@ extern int parse_solitary_modifier (Lisp_Object symbol); | |||
| 432 | extern Lisp_Object real_this_command; | 432 | extern Lisp_Object real_this_command; |
| 433 | 433 | ||
| 434 | extern int quit_char; | 434 | extern int quit_char; |
| 435 | 435 | extern bool input_was_pending; | |
| 436 | extern unsigned int timers_run; | 436 | extern unsigned int timers_run; |
| 437 | 437 | ||
| 438 | extern bool menu_separator_name_p (const char *); | 438 | extern bool menu_separator_name_p (const char *); |
diff --git a/src/xdisp.c b/src/xdisp.c index 749893baad6..43447e2bf7e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4262,6 +4262,7 @@ handle_fontified_prop (struct it *it) | |||
| 4262 | if (!STRINGP (it->string) | 4262 | if (!STRINGP (it->string) |
| 4263 | && it->s == NULL | 4263 | && it->s == NULL |
| 4264 | && !NILP (Vfontification_functions) | 4264 | && !NILP (Vfontification_functions) |
| 4265 | && !(input_was_pending && redisplay_skip_fontification_on_input) | ||
| 4265 | && !NILP (Vrun_hooks) | 4266 | && !NILP (Vrun_hooks) |
| 4266 | && (pos = make_fixnum (IT_CHARPOS (*it)), | 4267 | && (pos = make_fixnum (IT_CHARPOS (*it)), |
| 4267 | prop = Fget_char_property (pos, Qfontified, Qnil), | 4268 | prop = Fget_char_property (pos, Qfontified, Qnil), |
| @@ -35598,6 +35599,19 @@ best except in special circumstances such as running redisplay tests | |||
| 35598 | in batch mode. */); | 35599 | in batch mode. */); |
| 35599 | redisplay_skip_initial_frame = true; | 35600 | redisplay_skip_initial_frame = true; |
| 35600 | 35601 | ||
| 35602 | DEFVAR_BOOL ("redisplay-skip-fontification-on-input", | ||
| 35603 | redisplay_skip_fontification_on_input, | ||
| 35604 | doc: /* Skip `fontification_functions` when there is input pending. | ||
| 35605 | If non-nil and there was input pending at the beginning of the command, | ||
| 35606 | the `fontification_functions` hook is not run. This usually does not | ||
| 35607 | affect the display because redisplay is completely skipped anyway if input | ||
| 35608 | was pending, but it can make scrolling smoother by avoiding | ||
| 35609 | unnecessary fontification. | ||
| 35610 | It is similar to `fast-but-imprecise-scrolling' with similar tradeoffs, | ||
| 35611 | but with the advantage that it should only affect the behavior when Emacs | ||
| 35612 | has trouble keeping up with the incoming input rate. */); | ||
| 35613 | redisplay_skip_fontification_on_input = false; | ||
| 35614 | |||
| 35601 | DEFVAR_BOOL ("redisplay-adhoc-scroll-in-resize-mini-windows", | 35615 | DEFVAR_BOOL ("redisplay-adhoc-scroll-in-resize-mini-windows", |
| 35602 | redisplay_adhoc_scroll_in_resize_mini_windows, | 35616 | redisplay_adhoc_scroll_in_resize_mini_windows, |
| 35603 | doc: /* If nil always use normal scrolling in minibuffer windows. | 35617 | doc: /* If nil always use normal scrolling in minibuffer windows. |