diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/window.c b/src/window.c index 265dafa6b80..3e43d8386b6 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -121,9 +121,6 @@ static int window_initialized; | |||
| 121 | /* Hook to run when window config changes. */ | 121 | /* Hook to run when window config changes. */ |
| 122 | static Lisp_Object Qwindow_configuration_change_hook; | 122 | static Lisp_Object Qwindow_configuration_change_hook; |
| 123 | 123 | ||
| 124 | /* Incremented by 1 whenever a window is deleted. */ | ||
| 125 | static int window_deletion_count; | ||
| 126 | |||
| 127 | /* Used by the function window_scroll_pixel_based */ | 124 | /* Used by the function window_scroll_pixel_based */ |
| 128 | static int window_scroll_pixel_based_preserve_x; | 125 | static int window_scroll_pixel_based_preserve_x; |
| 129 | static int window_scroll_pixel_based_preserve_y; | 126 | static int window_scroll_pixel_based_preserve_y; |
| @@ -614,7 +611,7 @@ WINDOW can be any window and defaults to the selected one. */) | |||
| 614 | /* Return the number of lines of W's body. Don't count any mode or | 611 | /* Return the number of lines of W's body. Don't count any mode or |
| 615 | header line of W. */ | 612 | header line of W. */ |
| 616 | 613 | ||
| 617 | int | 614 | static int |
| 618 | window_body_lines (struct window *w) | 615 | window_body_lines (struct window *w) |
| 619 | { | 616 | { |
| 620 | int height = XFASTINT (w->total_lines); | 617 | int height = XFASTINT (w->total_lines); |
| @@ -1974,14 +1971,6 @@ recombine_windows (Lisp_Object window) | |||
| 1974 | } | 1971 | } |
| 1975 | } | 1972 | } |
| 1976 | } | 1973 | } |
| 1977 | |||
| 1978 | /* If WINDOW can be deleted, delete it. */ | ||
| 1979 | Lisp_Object | ||
| 1980 | delete_deletable_window (Lisp_Object window) | ||
| 1981 | { | ||
| 1982 | if (!NILP (call1 (Qwindow_deletable_p, window))) | ||
| 1983 | call1 (Qdelete_window, window); | ||
| 1984 | } | ||
| 1985 | 1974 | ||
| 1986 | /*********************************************************************** | 1975 | /*********************************************************************** |
| 1987 | Window List | 1976 | Window List |
| @@ -2669,9 +2658,9 @@ window-start value is reasonable when this function is called. */) | |||
| 2669 | { | 2658 | { |
| 2670 | struct window *w, *r, *s; | 2659 | struct window *w, *r, *s; |
| 2671 | struct frame *f; | 2660 | struct frame *f; |
| 2672 | Lisp_Object sibling, pwindow, swindow, delta; | 2661 | Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; |
| 2673 | EMACS_INT startpos; | 2662 | EMACS_INT startpos IF_LINT (= 0); |
| 2674 | int top, new_top, resize_failed; | 2663 | int top IF_LINT (= 0), new_top, resize_failed; |
| 2675 | 2664 | ||
| 2676 | w = decode_any_window (window); | 2665 | w = decode_any_window (window); |
| 2677 | XSETWINDOW (window, w); | 2666 | XSETWINDOW (window, w); |
| @@ -2757,10 +2746,10 @@ window-start value is reasonable when this function is called. */) | |||
| 2757 | windows_or_buffers_changed++; | 2746 | windows_or_buffers_changed++; |
| 2758 | Vwindow_list = Qnil; | 2747 | Vwindow_list = Qnil; |
| 2759 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; | 2748 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; |
| 2749 | resize_failed = 0; | ||
| 2760 | 2750 | ||
| 2761 | if (NILP (w->buffer)) | 2751 | if (NILP (w->buffer)) |
| 2762 | { | 2752 | { |
| 2763 | resize_failed = 0; | ||
| 2764 | /* Resize subwindows vertically. */ | 2753 | /* Resize subwindows vertically. */ |
| 2765 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); | 2754 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); |
| 2766 | w->top_line = r->top_line; | 2755 | w->top_line = r->top_line; |
| @@ -3078,12 +3067,12 @@ run_window_configuration_change_hook (struct frame *f) | |||
| 3078 | if (!NILP (Flocal_variable_p (Qwindow_configuration_change_hook, | 3067 | if (!NILP (Flocal_variable_p (Qwindow_configuration_change_hook, |
| 3079 | buffer))) | 3068 | buffer))) |
| 3080 | { | 3069 | { |
| 3081 | int count = SPECPDL_INDEX (); | 3070 | int inner_count = SPECPDL_INDEX (); |
| 3082 | record_unwind_protect (select_window_norecord, Fselected_window ()); | 3071 | record_unwind_protect (select_window_norecord, Fselected_window ()); |
| 3083 | select_window_norecord (window); | 3072 | select_window_norecord (window); |
| 3084 | run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, | 3073 | run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, |
| 3085 | buffer)); | 3074 | buffer)); |
| 3086 | unbind_to (count, Qnil); | 3075 | unbind_to (inner_count, Qnil); |
| 3087 | } | 3076 | } |
| 3088 | } | 3077 | } |
| 3089 | } | 3078 | } |
| @@ -3617,7 +3606,7 @@ resize_window_check (struct window *w, int horflag) | |||
| 3617 | static void | 3606 | static void |
| 3618 | resize_window_apply (struct window *w, int horflag) | 3607 | resize_window_apply (struct window *w, int horflag) |
| 3619 | { | 3608 | { |
| 3620 | struct window *c, *p; | 3609 | struct window *c; |
| 3621 | int pos; | 3610 | int pos; |
| 3622 | 3611 | ||
| 3623 | /* Note: Assigning new_normal requires that the new total size of the | 3612 | /* Note: Assigning new_normal requires that the new total size of the |
| @@ -3809,7 +3798,7 @@ resize_frame_windows (struct frame *f, int size, int horflag) | |||
| 3809 | DEFUN ("split-window-internal", Fsplit_window_internal, Ssplit_window_internal, 4, 4, 0, | 3798 | DEFUN ("split-window-internal", Fsplit_window_internal, Ssplit_window_internal, 4, 4, 0, |
| 3810 | doc: /* Split window OLD. | 3799 | doc: /* Split window OLD. |
| 3811 | Second argument TOTAL-SIZE specifies the number of lines or columns of the | 3800 | Second argument TOTAL-SIZE specifies the number of lines or columns of the |
| 3812 | new window. In any case TOTAL-SIZE must be a positive integer | 3801 | new window. In any case TOTAL-SIZE must be a positive integer |
| 3813 | 3802 | ||
| 3814 | Third argument SIDE nil (or `below') specifies that the new window shall | 3803 | Third argument SIDE nil (or `below') specifies that the new window shall |
| 3815 | be located below WINDOW. SIDE `above' means the new window shall be | 3804 | be located below WINDOW. SIDE `above' means the new window shall be |