# HG changeset patch # User Richard M. Stallman # Date 797738639 0 # Node ID 645e3883da7220c8a716b9544ad16d32fa3eac8f # Parent b12a8765508b1995257e8ec6e09f0bab7196f25a (temp_output_buffer_show): Select the chosen window temporarily for running temp-buffer-show-hook. (syms_of_window): Fix typo. diff -r b12a8765508b -r 645e3883da72 src/window.c --- a/src/window.c Thu Apr 13 01:33:08 1995 +0000 +++ b/src/window.c Thu Apr 13 02:03:59 1995 +0000 @@ -2128,8 +2128,28 @@ set_marker_restricted (w->pointm, make_number (1), buf); } + /* Run temp-buffer-show-hook, with the chosen window selected. */ if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, Qtemp_buffer_show_hook); + { + Lisp_Object tem; + tem = Fboundp (Qtemp_buffer_show_hook); + if (!NILP (tem)) + { + 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)); + + Fselect_window (window); + call1 (Vrun_hooks, Qtemp_buffer_show_hook); + unbind_to (count, Qnil); + } + } + } } static @@ -3347,7 +3367,7 @@ Qwindow_live_p = intern ("window-live-p"); staticpro (&Qwindow_live_p); - Qtemp_buffer_show_hook = intern ("Qtemp-buffer-show-hook"); + Qtemp_buffer_show_hook = intern ("temp-buffer-show-hook"); staticpro (&Qtemp_buffer_show_hook); #ifndef MULTI_FRAME