Mercurial > emacs
comparison src/window.c @ 11731:b8d3aea195cd
(syms_of_window): Doc fix.
(temp_output_buffer_show): If we use Vtemp_buffer_show_function,
do nothing else.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 07 May 1995 00:39:49 +0000 |
parents | c4ee56df7173 |
children | b911d6f75664 |
comparison
equal
deleted
inserted
replaced
11730:084c36d46615 | 11731:b8d3aea195cd |
---|---|
2127 Vminibuf_scroll_window = window; | 2127 Vminibuf_scroll_window = window; |
2128 w = XWINDOW (window); | 2128 w = XWINDOW (window); |
2129 XSETFASTINT (w->hscroll, 0); | 2129 XSETFASTINT (w->hscroll, 0); |
2130 set_marker_restricted (w->start, make_number (1), buf); | 2130 set_marker_restricted (w->start, make_number (1), buf); |
2131 set_marker_restricted (w->pointm, make_number (1), buf); | 2131 set_marker_restricted (w->pointm, make_number (1), buf); |
2132 } | 2132 |
2133 | 2133 /* Run temp-buffer-show-hook, with the chosen window selected. */ |
2134 /* Run temp-buffer-show-hook, with the chosen window selected. */ | 2134 if (!NILP (Vrun_hooks)) |
2135 if (!NILP (Vrun_hooks)) | |
2136 { | |
2137 Lisp_Object tem; | |
2138 tem = Fboundp (Qtemp_buffer_show_hook); | |
2139 if (!NILP (tem)) | |
2140 { | 2135 { |
2141 tem = Fsymbol_value (Qtemp_buffer_show_hook); | 2136 Lisp_Object tem; |
2137 tem = Fboundp (Qtemp_buffer_show_hook); | |
2142 if (!NILP (tem)) | 2138 if (!NILP (tem)) |
2143 { | 2139 { |
2144 int count = specpdl_ptr - specpdl; | 2140 tem = Fsymbol_value (Qtemp_buffer_show_hook); |
2145 | 2141 if (!NILP (tem)) |
2146 /* Select the window that was chosen, for running the hook. */ | 2142 { |
2147 record_unwind_protect (Fset_window_configuration, | 2143 int count = specpdl_ptr - specpdl; |
2148 Fcurrent_window_configuration (Qnil)); | 2144 |
2149 | 2145 /* Select the window that was chosen, for running the hook. */ |
2150 Fselect_window (window); | 2146 record_unwind_protect (Fset_window_configuration, |
2151 call1 (Vrun_hooks, Qtemp_buffer_show_hook); | 2147 Fcurrent_window_configuration (Qnil)); |
2152 unbind_to (count, Qnil); | 2148 |
2149 Fselect_window (window); | |
2150 call1 (Vrun_hooks, Qtemp_buffer_show_hook); | |
2151 unbind_to (count, Qnil); | |
2152 } | |
2153 } | 2153 } |
2154 } | 2154 } |
2155 } | 2155 } |
2156 } | 2156 } |
2157 | 2157 |
3379 #endif | 3379 #endif |
3380 | 3380 |
3381 DEFVAR_LISP ("temp-buffer-show-function", &Vtemp_buffer_show_function, | 3381 DEFVAR_LISP ("temp-buffer-show-function", &Vtemp_buffer_show_function, |
3382 "Non-nil means call as function to display a help buffer.\n\ | 3382 "Non-nil means call as function to display a help buffer.\n\ |
3383 The function is called with one argument, the buffer to be displayed.\n\ | 3383 The function is called with one argument, the buffer to be displayed.\n\ |
3384 Used by `with-output-to-temp-buffer'."); | 3384 Used by `with-output-to-temp-buffer'.\n\ |
3385 If this function is used, then it must do the entire job of showing\n\ | |
3386 the buffer; `temp-buffer-show-hook' is not run unless this function runs it."); | |
3385 Vtemp_buffer_show_function = Qnil; | 3387 Vtemp_buffer_show_function = Qnil; |
3386 | 3388 |
3387 DEFVAR_LISP ("display-buffer-function", &Vdisplay_buffer_function, | 3389 DEFVAR_LISP ("display-buffer-function", &Vdisplay_buffer_function, |
3388 "If non-nil, function to call to handle `display-buffer'.\n\ | 3390 "If non-nil, function to call to handle `display-buffer'.\n\ |
3389 It will receive two args, the buffer and a flag which if non-nil means\n\ | 3391 It will receive two args, the buffer and a flag which if non-nil means\n\ |