diff options
| author | Stefan Monnier | 2011-03-31 00:24:03 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-31 00:24:03 -0400 |
| commit | 40d83b412f584cc02e68d4eac8fd5e6eb769e2fe (patch) | |
| tree | b56f27a7e6d75a8c1fd27b00179a27b5efea0a32 /src/window.c | |
| parent | f488fb6528738131ef41859e1f04125f2e50efce (diff) | |
| parent | 44f230aa043ebb222aa0876b44d70484d5dd38db (diff) | |
| download | emacs-40d83b412f584cc02e68d4eac8fd5e6eb769e2fe.tar.gz emacs-40d83b412f584cc02e68d4eac8fd5e6eb769e2fe.zip | |
Merge from trunk
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/src/window.c b/src/window.c index f35815d757c..4bd533c22ac 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2978,14 +2978,10 @@ shrink_windows (int total, int size, int nchildren, int shrinkable, | |||
| 2978 | while (total_shrink > total_removed) | 2978 | while (total_shrink > total_removed) |
| 2979 | { | 2979 | { |
| 2980 | int nonzero_sizes = 0; | 2980 | int nonzero_sizes = 0; |
| 2981 | int nonzero_idx = -1; | ||
| 2982 | 2981 | ||
| 2983 | for (i = 0; i < nchildren; ++i) | 2982 | for (i = 0; i < nchildren; ++i) |
| 2984 | if (new_sizes[i] > 0) | 2983 | if (new_sizes[i] > 0) |
| 2985 | { | 2984 | ++nonzero_sizes; |
| 2986 | ++nonzero_sizes; | ||
| 2987 | nonzero_idx = i; | ||
| 2988 | } | ||
| 2989 | 2985 | ||
| 2990 | for (i = 0; i < nchildren; ++i) | 2986 | for (i = 0; i < nchildren; ++i) |
| 2991 | if (new_sizes[i] > min_sizes[i]) | 2987 | if (new_sizes[i] > min_sizes[i]) |
| @@ -3689,27 +3685,23 @@ temp_output_buffer_show (register Lisp_Object buf) | |||
| 3689 | 3685 | ||
| 3690 | /* Run temp-buffer-show-hook, with the chosen window selected | 3686 | /* Run temp-buffer-show-hook, with the chosen window selected |
| 3691 | and its buffer current. */ | 3687 | and its buffer current. */ |
| 3692 | 3688 | { | |
| 3693 | if (!NILP (Vrun_hooks) | 3689 | int count = SPECPDL_INDEX (); |
| 3694 | && !NILP (Fboundp (Qtemp_buffer_show_hook)) | 3690 | Lisp_Object prev_window, prev_buffer; |
| 3695 | && !NILP (Fsymbol_value (Qtemp_buffer_show_hook))) | 3691 | prev_window = selected_window; |
| 3696 | { | 3692 | XSETBUFFER (prev_buffer, old); |
| 3697 | int count = SPECPDL_INDEX (); | 3693 | |
| 3698 | Lisp_Object prev_window, prev_buffer; | 3694 | /* Select the window that was chosen, for running the hook. |
| 3699 | prev_window = selected_window; | 3695 | Note: Both Fselect_window and select_window_norecord may |
| 3700 | XSETBUFFER (prev_buffer, old); | 3696 | set-buffer to the buffer displayed in the window, |
| 3701 | 3697 | so we need to save the current buffer. --stef */ | |
| 3702 | /* Select the window that was chosen, for running the hook. | 3698 | record_unwind_protect (Fset_buffer, prev_buffer); |
| 3703 | Note: Both Fselect_window and select_window_norecord may | 3699 | record_unwind_protect (select_window_norecord, prev_window); |
| 3704 | set-buffer to the buffer displayed in the window, | 3700 | Fselect_window (window, Qt); |
| 3705 | so we need to save the current buffer. --stef */ | 3701 | Fset_buffer (w->buffer); |
| 3706 | record_unwind_protect (Fset_buffer, prev_buffer); | 3702 | Frun_hooks (1, &Qtemp_buffer_show_hook); |
| 3707 | record_unwind_protect (select_window_norecord, prev_window); | 3703 | unbind_to (count, Qnil); |
| 3708 | Fselect_window (window, Qt); | 3704 | } |
| 3709 | Fset_buffer (w->buffer); | ||
| 3710 | call1 (Vrun_hooks, Qtemp_buffer_show_hook); | ||
| 3711 | unbind_to (count, Qnil); | ||
| 3712 | } | ||
| 3713 | } | 3705 | } |
| 3714 | } | 3706 | } |
| 3715 | 3707 | ||