aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-01-11 17:16:12 +0000
committerRichard M. Stallman1996-01-11 17:16:12 +0000
commitdba06815c940f29cc9718c526e8a9cf40e47a446 (patch)
treeb2d2eef0bc3cbe5602084e67e8994b64053a9330
parent616db04b185f9e52faa2e0c3f491fb4b7b22cd41 (diff)
downloademacs-dba06815c940f29cc9718c526e8a9cf40e47a446.tar.gz
emacs-dba06815c940f29cc9718c526e8a9cf40e47a446.zip
(Fset_window_buffer): Call the window-scroll-functions.
-rw-r--r--src/window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index 59ab7c53a9b..c3ed9928461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -108,6 +108,8 @@ int next_screen_context_lines;
108static int sequence_number; 108static int sequence_number;
109 109
110#define min(a, b) ((a) < (b) ? (a) : (b)) 110#define min(a, b) ((a) < (b) ? (a) : (b))
111
112extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
111 113
112DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, 114DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0,
113 "Returns t if OBJECT is a window.") 115 "Returns t if OBJECT is a window.")
@@ -1864,7 +1866,7 @@ BUFFER can be a buffer or buffer name.")
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);
@@ -1877,6 +1879,9 @@ BUFFER can be a buffer or buffer name.")
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}