# HG changeset patch # User Richard M. Stallman # Date 821380572 0 # Node ID 0d67df27dc2a26107c7a640e082be6aa90c33d0b # Parent fa30f75285025aed6b18c12b0d6f58af05ba9247 (Fset_window_buffer): Call the window-scroll-functions. diff -r fa30f7528502 -r 0d67df27dc2a src/window.c --- a/src/window.c Thu Jan 11 17:11:39 1996 +0000 +++ b/src/window.c Thu Jan 11 17:16:12 1996 +0000 @@ -108,6 +108,8 @@ static int sequence_number; #define min(a, b) ((a) < (b) ? (a) : (b)) + +extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, "Returns t if OBJECT is a window.") @@ -1864,7 +1866,7 @@ w->buffer = buffer; XSETFASTINT (w->window_end_pos, 0); w->window_end_valid = Qnil; - XSETFASTINT(w->hscroll, 0); + XSETFASTINT (w->hscroll, 0); Fset_marker (w->pointm, make_number (BUF_PT (XBUFFER (buffer))), buffer); @@ -1877,6 +1879,9 @@ windows_or_buffers_changed++; if (EQ (window, selected_window)) Fset_buffer (buffer); + if (! NILP (Vwindow_scroll_functions)) + run_hook_with_args_2 (Qwindow_scroll_functions, window, + Fmarker_position (w->start)); return Qnil; }