diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/src/window.c b/src/window.c index 265dafa6b80..7a026b3a1c7 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -82,6 +82,7 @@ static int foreach_window_1 (struct window *, | |||
| 82 | int (* fn) (struct window *, void *), | 82 | int (* fn) (struct window *, void *), |
| 83 | void *); | 83 | void *); |
| 84 | static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object); | 84 | static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 85 | static int resize_window_check (struct window *, int); | ||
| 85 | static void resize_window_apply (struct window *, int); | 86 | static void resize_window_apply (struct window *, int); |
| 86 | static Lisp_Object select_window (Lisp_Object, Lisp_Object, int); | 87 | static Lisp_Object select_window (Lisp_Object, Lisp_Object, int); |
| 87 | 88 | ||
| @@ -121,9 +122,6 @@ static int window_initialized; | |||
| 121 | /* Hook to run when window config changes. */ | 122 | /* Hook to run when window config changes. */ |
| 122 | static Lisp_Object Qwindow_configuration_change_hook; | 123 | static Lisp_Object Qwindow_configuration_change_hook; |
| 123 | 124 | ||
| 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 */ | 125 | /* Used by the function window_scroll_pixel_based */ |
| 128 | static int window_scroll_pixel_based_preserve_x; | 126 | static int window_scroll_pixel_based_preserve_x; |
| 129 | static int window_scroll_pixel_based_preserve_y; | 127 | static int window_scroll_pixel_based_preserve_y; |
| @@ -614,7 +612,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 | 612 | /* Return the number of lines of W's body. Don't count any mode or |
| 615 | header line of W. */ | 613 | header line of W. */ |
| 616 | 614 | ||
| 617 | int | 615 | static int |
| 618 | window_body_lines (struct window *w) | 616 | window_body_lines (struct window *w) |
| 619 | { | 617 | { |
| 620 | int height = XFASTINT (w->total_lines); | 618 | int height = XFASTINT (w->total_lines); |
| @@ -1974,14 +1972,6 @@ recombine_windows (Lisp_Object window) | |||
| 1974 | } | 1972 | } |
| 1975 | } | 1973 | } |
| 1976 | } | 1974 | } |
| 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 | 1975 | ||
| 1986 | /*********************************************************************** | 1976 | /*********************************************************************** |
| 1987 | Window List | 1977 | Window List |
| @@ -2643,7 +2633,7 @@ selected frame and no others. */) | |||
| 2643 | return Qnil; | 2633 | return Qnil; |
| 2644 | } | 2634 | } |
| 2645 | 2635 | ||
| 2646 | Lisp_Object | 2636 | static Lisp_Object |
| 2647 | resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal, Lisp_Object ignore) | 2637 | resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal, Lisp_Object ignore) |
| 2648 | { | 2638 | { |
| 2649 | return call4 (Qresize_root_window, window, delta, horizontal, ignore); | 2639 | return call4 (Qresize_root_window, window, delta, horizontal, ignore); |
| @@ -2669,9 +2659,9 @@ window-start value is reasonable when this function is called. */) | |||
| 2669 | { | 2659 | { |
| 2670 | struct window *w, *r, *s; | 2660 | struct window *w, *r, *s; |
| 2671 | struct frame *f; | 2661 | struct frame *f; |
| 2672 | Lisp_Object sibling, pwindow, swindow, delta; | 2662 | Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; |
| 2673 | EMACS_INT startpos; | 2663 | EMACS_INT startpos IF_LINT (= 0); |
| 2674 | int top, new_top, resize_failed; | 2664 | int top IF_LINT (= 0), new_top, resize_failed; |
| 2675 | 2665 | ||
| 2676 | w = decode_any_window (window); | 2666 | w = decode_any_window (window); |
| 2677 | XSETWINDOW (window, w); | 2667 | XSETWINDOW (window, w); |
| @@ -2757,10 +2747,10 @@ window-start value is reasonable when this function is called. */) | |||
| 2757 | windows_or_buffers_changed++; | 2747 | windows_or_buffers_changed++; |
| 2758 | Vwindow_list = Qnil; | 2748 | Vwindow_list = Qnil; |
| 2759 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; | 2749 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; |
| 2750 | resize_failed = 0; | ||
| 2760 | 2751 | ||
| 2761 | if (NILP (w->buffer)) | 2752 | if (NILP (w->buffer)) |
| 2762 | { | 2753 | { |
| 2763 | resize_failed = 0; | ||
| 2764 | /* Resize subwindows vertically. */ | 2754 | /* Resize subwindows vertically. */ |
| 2765 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); | 2755 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); |
| 2766 | w->top_line = r->top_line; | 2756 | w->top_line = r->top_line; |
| @@ -3078,12 +3068,12 @@ run_window_configuration_change_hook (struct frame *f) | |||
| 3078 | if (!NILP (Flocal_variable_p (Qwindow_configuration_change_hook, | 3068 | if (!NILP (Flocal_variable_p (Qwindow_configuration_change_hook, |
| 3079 | buffer))) | 3069 | buffer))) |
| 3080 | { | 3070 | { |
| 3081 | int count = SPECPDL_INDEX (); | 3071 | int inner_count = SPECPDL_INDEX (); |
| 3082 | record_unwind_protect (select_window_norecord, Fselected_window ()); | 3072 | record_unwind_protect (select_window_norecord, Fselected_window ()); |
| 3083 | select_window_norecord (window); | 3073 | select_window_norecord (window); |
| 3084 | run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, | 3074 | run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, |
| 3085 | buffer)); | 3075 | buffer)); |
| 3086 | unbind_to (count, Qnil); | 3076 | unbind_to (inner_count, Qnil); |
| 3087 | } | 3077 | } |
| 3088 | } | 3078 | } |
| 3089 | } | 3079 | } |
| @@ -3533,7 +3523,7 @@ Note: This function does not operate on any subwindows of WINDOW. */) | |||
| 3533 | Note: This function does not check any of `window-fixed-size-p', | 3523 | Note: This function does not check any of `window-fixed-size-p', |
| 3534 | `window-min-height' or `window-min-width'. It does check that window | 3524 | `window-min-height' or `window-min-width'. It does check that window |
| 3535 | sizes do not drop below one line (two columns). */ | 3525 | sizes do not drop below one line (two columns). */ |
| 3536 | int | 3526 | static int |
| 3537 | resize_window_check (struct window *w, int horflag) | 3527 | resize_window_check (struct window *w, int horflag) |
| 3538 | { | 3528 | { |
| 3539 | struct window *c; | 3529 | struct window *c; |
| @@ -3617,7 +3607,7 @@ resize_window_check (struct window *w, int horflag) | |||
| 3617 | static void | 3607 | static void |
| 3618 | resize_window_apply (struct window *w, int horflag) | 3608 | resize_window_apply (struct window *w, int horflag) |
| 3619 | { | 3609 | { |
| 3620 | struct window *c, *p; | 3610 | struct window *c; |
| 3621 | int pos; | 3611 | int pos; |
| 3622 | 3612 | ||
| 3623 | /* Note: Assigning new_normal requires that the new total size of the | 3613 | /* Note: Assigning new_normal requires that the new total size of the |
| @@ -3809,7 +3799,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, | 3799 | DEFUN ("split-window-internal", Fsplit_window_internal, Ssplit_window_internal, 4, 4, 0, |
| 3810 | doc: /* Split window OLD. | 3800 | doc: /* Split window OLD. |
| 3811 | Second argument TOTAL-SIZE specifies the number of lines or columns of the | 3801 | 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 | 3802 | new window. In any case TOTAL-SIZE must be a positive integer |
| 3813 | 3803 | ||
| 3814 | Third argument SIDE nil (or `below') specifies that the new window shall | 3804 | 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 | 3805 | be located below WINDOW. SIDE `above' means the new window shall be |