aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1995-05-07 00:39:49 +0000
committerRichard M. Stallman <[email protected]>1995-05-07 00:39:49 +0000
commitf52cca033359658c0922618467347de9b1e4f3d0 (patch)
tree67d3de83894f376744bdd0deae28cdff66a9f567 /src/window.c
parentbf464fada915b88a6d240be8aa36a76ca85f40f9 (diff)
(syms_of_window): Doc fix.
(temp_output_buffer_show): If we use Vtemp_buffer_show_function, do nothing else.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/window.c b/src/window.c
index 5ada705a35..c806739fd0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2129,27 +2129,27 @@ temp_output_buffer_show (buf)
XSETFASTINT (w->hscroll, 0);
set_marker_restricted (w->start, make_number (1), buf);
set_marker_restricted (w->pointm, make_number (1), buf);
- }
- /* Run temp-buffer-show-hook, with the chosen window selected. */
- if (!NILP (Vrun_hooks))
- {
- Lisp_Object tem;
- tem = Fboundp (Qtemp_buffer_show_hook);
- if (!NILP (tem))
+ /* Run temp-buffer-show-hook, with the chosen window selected. */
+ if (!NILP (Vrun_hooks))
{
- tem = Fsymbol_value (Qtemp_buffer_show_hook);
+ Lisp_Object tem;
+ tem = Fboundp (Qtemp_buffer_show_hook);
if (!NILP (tem))
{
- int count = specpdl_ptr - specpdl;
+ tem = Fsymbol_value (Qtemp_buffer_show_hook);
+ if (!NILP (tem))
+ {
+ int count = specpdl_ptr - specpdl;
- /* Select the window that was chosen, for running the hook. */
- record_unwind_protect (Fset_window_configuration,
- Fcurrent_window_configuration (Qnil));
+ /* Select the window that was chosen, for running the hook. */
+ record_unwind_protect (Fset_window_configuration,
+ Fcurrent_window_configuration (Qnil));
- Fselect_window (window);
- call1 (Vrun_hooks, Qtemp_buffer_show_hook);
- unbind_to (count, Qnil);
+ Fselect_window (window);
+ call1 (Vrun_hooks, Qtemp_buffer_show_hook);
+ unbind_to (count, Qnil);
+ }
}
}
}
@@ -3381,7 +3381,9 @@ syms_of_window ()
DEFVAR_LISP ("temp-buffer-show-function", &Vtemp_buffer_show_function,
"Non-nil means call as function to display a help buffer.\n\
The function is called with one argument, the buffer to be displayed.\n\
-Used by `with-output-to-temp-buffer'.");
+Used by `with-output-to-temp-buffer'.\n\
+If this function is used, then it must do the entire job of showing\n\
+the buffer; `temp-buffer-show-hook' is not run unless this function runs it.");
Vtemp_buffer_show_function = Qnil;
DEFVAR_LISP ("display-buffer-function", &Vdisplay_buffer_function,