aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-05-07 00:39:49 +0000
committerRichard M. Stallman1995-05-07 00:39:49 +0000
commitf52cca033359658c0922618467347de9b1e4f3d0 (patch)
tree67d3de83894f376744bdd0deae28cdff66a9f567 /src
parentbf464fada915b88a6d240be8aa36a76ca85f40f9 (diff)
downloademacs-f52cca033359658c0922618467347de9b1e4f3d0.tar.gz
emacs-f52cca033359658c0922618467347de9b1e4f3d0.zip
(syms_of_window): Doc fix.
(temp_output_buffer_show): If we use Vtemp_buffer_show_function, do nothing else.
Diffstat (limited to 'src')
-rw-r--r--src/window.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/window.c b/src/window.c
index 5ada705a351..c806739fd0e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2129,27 +2129,27 @@ temp_output_buffer_show (buf)
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 }
2133 2132
2134 /* Run temp-buffer-show-hook, with the chosen window selected. */ 2133 /* Run temp-buffer-show-hook, with the chosen window selected. */
2135 if (!NILP (Vrun_hooks)) 2134 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);
2141 if (!NILP (tem))
2142 {
2143 int count = specpdl_ptr - specpdl;
2145 2144
2146 /* Select the window that was chosen, for running the hook. */ 2145 /* Select the window that was chosen, for running the hook. */
2147 record_unwind_protect (Fset_window_configuration, 2146 record_unwind_protect (Fset_window_configuration,
2148 Fcurrent_window_configuration (Qnil)); 2147 Fcurrent_window_configuration (Qnil));
2149 2148
2150 Fselect_window (window); 2149 Fselect_window (window);
2151 call1 (Vrun_hooks, Qtemp_buffer_show_hook); 2150 call1 (Vrun_hooks, Qtemp_buffer_show_hook);
2152 unbind_to (count, Qnil); 2151 unbind_to (count, Qnil);
2152 }
2153 } 2153 }
2154 } 2154 }
2155 } 2155 }
@@ -3381,7 +3381,9 @@ syms_of_window ()
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\
3383The function is called with one argument, the buffer to be displayed.\n\ 3383The function is called with one argument, the buffer to be displayed.\n\
3384Used by `with-output-to-temp-buffer'."); 3384Used by `with-output-to-temp-buffer'.\n\
3385If this function is used, then it must do the entire job of showing\n\
3386the 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,