comparison src/window.c @ 14149:0d67df27dc2a

(Fset_window_buffer): Call the window-scroll-functions.
author Richard M. Stallman <rms@gnu.org>
date Thu, 11 Jan 1996 17:16:12 +0000
parents 415aa106fa17
children 672017f09b0c
comparison
equal deleted inserted replaced
14148:fa30f7528502 14149:0d67df27dc2a
106 106
107 /* Incremented for each window created. */ 107 /* Incremented for each window created. */
108 static int sequence_number; 108 static int sequence_number;
109 109
110 #define min(a, b) ((a) < (b) ? (a) : (b)) 110 #define min(a, b) ((a) < (b) ? (a) : (b))
111
112 extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
111 113
112 DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, 114 DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0,
113 "Returns t if OBJECT is a window.") 115 "Returns t if OBJECT is a window.")
114 (object) 116 (object)
115 Lisp_Object object; 117 Lisp_Object object;
1862 } 1864 }
1863 1865
1864 w->buffer = buffer; 1866 w->buffer = buffer;
1865 XSETFASTINT (w->window_end_pos, 0); 1867 XSETFASTINT (w->window_end_pos, 0);
1866 w->window_end_valid = Qnil; 1868 w->window_end_valid = Qnil;
1867 XSETFASTINT(w->hscroll, 0); 1869 XSETFASTINT (w->hscroll, 0);
1868 Fset_marker (w->pointm, 1870 Fset_marker (w->pointm,
1869 make_number (BUF_PT (XBUFFER (buffer))), 1871 make_number (BUF_PT (XBUFFER (buffer))),
1870 buffer); 1872 buffer);
1871 set_marker_restricted (w->start, 1873 set_marker_restricted (w->start,
1872 make_number (XBUFFER (buffer)->last_window_start), 1874 make_number (XBUFFER (buffer)->last_window_start),
1875 w->force_start = Qnil; 1877 w->force_start = Qnil;
1876 XSETFASTINT (w->last_modified, 0); 1878 XSETFASTINT (w->last_modified, 0);
1877 windows_or_buffers_changed++; 1879 windows_or_buffers_changed++;
1878 if (EQ (window, selected_window)) 1880 if (EQ (window, selected_window))
1879 Fset_buffer (buffer); 1881 Fset_buffer (buffer);
1882 if (! NILP (Vwindow_scroll_functions))
1883 run_hook_with_args_2 (Qwindow_scroll_functions, window,
1884 Fmarker_position (w->start));
1880 1885
1881 return Qnil; 1886 return Qnil;
1882 } 1887 }
1883 1888
1884 DEFUN ("select-window", Fselect_window, Sselect_window, 1, 1, 0, 1889 DEFUN ("select-window", Fselect_window, Sselect_window, 1, 1, 0,