X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/673b8d0ecaef28d061761cff1d415a44e03adc50..2a205424e771703217ce8c6b4252d810d3310cd2:/src/xdisp.c diff --git a/src/xdisp.c b/src/xdisp.c index 807cbc2b79..d7de7dbe82 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -231,7 +231,7 @@ extern Lisp_Object Qhelp_echo; Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; -Lisp_Object Qredisplay_end_trigger_functions; +Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions; Lisp_Object Qinhibit_point_motion_hooks; Lisp_Object QCeval, QCfile, QCdata, QCpropertize; Lisp_Object Qfontified; @@ -10172,6 +10172,16 @@ redisplay_internal (preserve_echo_area) ++redisplaying_p; specbind (Qinhibit_free_realized_faces, Qnil); + { + Lisp_Object tail, frame; + + FOR_EACH_FRAME (tail, frame) + { + struct frame *f = XFRAME (frame); + f->already_hscrolled_p = 0; + } + } + retry: pause = 0; reconsider_clip_changes (w, current_buffer); @@ -10606,8 +10616,12 @@ redisplay_internal (preserve_echo_area) if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f)) { /* See if we have to hscroll. */ - if (hscroll_windows (f->root_window)) - goto retry; + if (!f->already_hscrolled_p) + { + f->already_hscrolled_p = 1; + if (hscroll_windows (f->root_window)) + goto retry; + } /* Prevent various kinds of signals during display update. stdio is not robust about handling @@ -23122,6 +23136,12 @@ and its new display-start position. Note that the value of `window-end' is not valid when these functions are called. */); Vwindow_scroll_functions = Qnil; + DEFVAR_LISP ("redisplay-end-trigger-functions", &Vredisplay_end_trigger_functions, + doc: /* Functions called when redisplay of a window reaches the end trigger. +Each function is called with two arguments, the window and the end trigger value. +See `set-window-redisplay-end-trigger'. */); + Vredisplay_end_trigger_functions = Qnil; + DEFVAR_BOOL ("mouse-autoselect-window", &mouse_autoselect_window, doc: /* *Non-nil means autoselect window with mouse pointer. */); mouse_autoselect_window = 0;