diff options
| author | Richard M. Stallman | 1995-04-13 02:03:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-04-13 02:03:59 +0000 |
| commit | 2cccc823493aa1b8c1c117d5f2831a3d023d0cfc (patch) | |
| tree | b0b8a15cac12e540a1426a2e2c27737ea91e6586 /src | |
| parent | b1defad27b58295a0cf4778491514e53c1684eb4 (diff) | |
| download | emacs-2cccc823493aa1b8c1c117d5f2831a3d023d0cfc.tar.gz emacs-2cccc823493aa1b8c1c117d5f2831a3d023d0cfc.zip | |
(temp_output_buffer_show): Select the chosen window
temporarily for running temp-buffer-show-hook.
(syms_of_window): Fix typo.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c index 56281f02027..daefb968f91 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2128,8 +2128,28 @@ temp_output_buffer_show (buf) | |||
| 2128 | set_marker_restricted (w->pointm, make_number (1), buf); | 2128 | set_marker_restricted (w->pointm, make_number (1), buf); |
| 2129 | } | 2129 | } |
| 2130 | 2130 | ||
| 2131 | /* Run temp-buffer-show-hook, with the chosen window selected. */ | ||
| 2131 | if (!NILP (Vrun_hooks)) | 2132 | if (!NILP (Vrun_hooks)) |
| 2132 | call1 (Vrun_hooks, Qtemp_buffer_show_hook); | 2133 | { |
| 2134 | Lisp_Object tem; | ||
| 2135 | tem = Fboundp (Qtemp_buffer_show_hook); | ||
| 2136 | if (!NILP (tem)) | ||
| 2137 | { | ||
| 2138 | tem = Fsymbol_value (Qtemp_buffer_show_hook); | ||
| 2139 | if (!NILP (tem)) | ||
| 2140 | { | ||
| 2141 | int count = specpdl_ptr - specpdl; | ||
| 2142 | |||
| 2143 | /* Select the window that was chosen, for running the hook. */ | ||
| 2144 | record_unwind_protect (Fset_window_configuration, | ||
| 2145 | Fcurrent_window_configuration (Qnil)); | ||
| 2146 | |||
| 2147 | Fselect_window (window); | ||
| 2148 | call1 (Vrun_hooks, Qtemp_buffer_show_hook); | ||
| 2149 | unbind_to (count, Qnil); | ||
| 2150 | } | ||
| 2151 | } | ||
| 2152 | } | ||
| 2133 | } | 2153 | } |
| 2134 | 2154 | ||
| 2135 | static | 2155 | static |
| @@ -3347,7 +3367,7 @@ syms_of_window () | |||
| 3347 | Qwindow_live_p = intern ("window-live-p"); | 3367 | Qwindow_live_p = intern ("window-live-p"); |
| 3348 | staticpro (&Qwindow_live_p); | 3368 | staticpro (&Qwindow_live_p); |
| 3349 | 3369 | ||
| 3350 | Qtemp_buffer_show_hook = intern ("Qtemp-buffer-show-hook"); | 3370 | Qtemp_buffer_show_hook = intern ("temp-buffer-show-hook"); |
| 3351 | staticpro (&Qtemp_buffer_show_hook); | 3371 | staticpro (&Qtemp_buffer_show_hook); |
| 3352 | 3372 | ||
| 3353 | #ifndef MULTI_FRAME | 3373 | #ifndef MULTI_FRAME |