Mercurial > hg > xemacs-beta
comparison src/window.c @ 707:a307f9a2021d
[xemacs-hg @ 2001-12-20 05:49:28 by andyp]
sync with 21-4-6-windows
author | andyp |
---|---|
date | Thu, 20 Dec 2001 05:49:48 +0000 |
parents | fdefd0186b75 |
children | 943eaba38521 |
comparison
equal
deleted
inserted
replaced
706:c9bf82d465b5 | 707:a307f9a2021d |
---|---|
120 /* Number of lines of continuity in scrolling by screenfuls. */ | 120 /* Number of lines of continuity in scrolling by screenfuls. */ |
121 Fixnum next_screen_context_lines; | 121 Fixnum next_screen_context_lines; |
122 | 122 |
123 /* List of freed window configurations with 1 - 10 windows. */ | 123 /* List of freed window configurations with 1 - 10 windows. */ |
124 static Lisp_Object Vwindow_configuration_free_list[10]; | 124 static Lisp_Object Vwindow_configuration_free_list[10]; |
125 | |
126 Lisp_Object Qtruncate_partial_width_windows; | |
125 | 127 |
126 #define SET_LAST_MODIFIED(w, cache_too) \ | 128 #define SET_LAST_MODIFIED(w, cache_too) \ |
127 do { \ | 129 do { \ |
128 (w)->last_modified[CURRENT_DISP] = Qzero; \ | 130 (w)->last_modified[CURRENT_DISP] = Qzero; \ |
129 (w)->last_modified[DESIRED_DISP] = Qzero; \ | 131 (w)->last_modified[DESIRED_DISP] = Qzero; \ |
754 if (w->hscroll) | 756 if (w->hscroll) |
755 return 1; | 757 return 1; |
756 | 758 |
757 /* If truncate_partial_width_windows is true and the window is not | 759 /* If truncate_partial_width_windows is true and the window is not |
758 the full width of the frame it is truncated. */ | 760 the full width of the frame it is truncated. */ |
759 if (truncate_partial_width_windows | 761 if (!NILP (symbol_value_in_buffer (Qtruncate_partial_width_windows, |
762 w->buffer)) | |
760 && !(window_is_leftmost (w) && window_is_rightmost (w))) | 763 && !(window_is_leftmost (w) && window_is_rightmost (w))) |
761 return 1; | 764 return 1; |
762 | 765 |
763 /* If the window's buffer's value of truncate_lines is non-nil, then | 766 /* If the window's buffer's value of truncate_lines is non-nil, then |
764 the window is truncated. */ | 767 the window is truncated. */ |
2668 ring, we can just use Fprevious_window to find the last one. | 2671 ring, we can just use Fprevious_window to find the last one. |
2669 | 2672 |
2670 We can't just wait until we hit the first window again, | 2673 We can't just wait until we hit the first window again, |
2671 because it might be deleted. */ | 2674 because it might be deleted. */ |
2672 | 2675 |
2673 last_window = Fprevious_window (w, mini ? Qt : Qnil, frame_arg, Qt); | 2676 last_window = Fprevious_window (w, mini ? Qt : Qnil, frame_arg, device); |
2674 | 2677 |
2675 best_window = Qnil; | 2678 best_window = Qnil; |
2676 for (;;) | 2679 for (;;) |
2677 { | 2680 { |
2678 struct window *p = XWINDOW (w); | 2681 struct window *p = XWINDOW (w); |
2683 | 2686 |
2684 /* #### Still needed ?? */ | 2687 /* #### Still needed ?? */ |
2685 /* Given the outstanding quality of the rest of this code, | 2688 /* Given the outstanding quality of the rest of this code, |
2686 I feel no shame about putting this piece of shit in. */ | 2689 I feel no shame about putting this piece of shit in. */ |
2687 if (++lose_lose >= 500) | 2690 if (++lose_lose >= 500) |
2688 return Qnil; | 2691 { |
2692 /* Call to abort() added by Darryl Okahata (16 Nov. 2001), | |
2693 at Ben's request, to catch any remaining bugs. | |
2694 | |
2695 If you find that XEmacs is aborting here, and you | |
2696 need to be up and running ASAP, it should be safe to | |
2697 comment out the following abort(), as long as you | |
2698 leave the "break;" alone. */ | |
2699 abort(); | |
2700 break; /* <--- KEEP THIS HERE! Do not delete! */ | |
2701 } | |
2689 | 2702 |
2690 /* Note that we do not pay attention here to whether | 2703 /* Note that we do not pay attention here to whether |
2691 the frame is visible, since Fnext_window skips non-visible frames | 2704 the frame is visible, since Fnext_window skips non-visible frames |
2692 if that is desired, under the control of frame_arg. */ | 2705 if that is desired, under the control of frame_arg. */ |
2693 if (! MINI_WINDOW_P (p) | 2706 if (! MINI_WINDOW_P (p) |
3681 } | 3694 } |
3682 | 3695 |
3683 DEFUN ("split-window", Fsplit_window, 0, 3, "", /* | 3696 DEFUN ("split-window", Fsplit_window, 0, 3, "", /* |
3684 Split WINDOW, putting SIZE lines in the first of the pair. | 3697 Split WINDOW, putting SIZE lines in the first of the pair. |
3685 WINDOW defaults to the selected one and SIZE to half its size. | 3698 WINDOW defaults to the selected one and SIZE to half its size. |
3686 If optional third arg HORFLAG is non-nil, split side by side | 3699 If optional third arg HORFLAG is non-nil, split side by side and put |
3687 and put SIZE columns in the first of the pair. | 3700 SIZE columns in the first of the pair. The newly created window is |
3701 returned. | |
3688 */ | 3702 */ |
3689 (window, size, horflag)) | 3703 (window, size, horflag)) |
3690 { | 3704 { |
3691 Lisp_Object new; | 3705 Lisp_Object new; |
3692 struct window *o, *p; | 3706 struct window *o, *p; |
6144 #endif | 6158 #endif |
6145 DEFSYMBOL (Qother_redisplay); | 6159 DEFSYMBOL (Qother_redisplay); |
6146 /* Qother in general.c */ | 6160 /* Qother in general.c */ |
6147 #endif | 6161 #endif |
6148 | 6162 |
6163 DEFSYMBOL (Qtruncate_partial_width_windows); | |
6164 | |
6149 DEFSUBR (Fselected_window); | 6165 DEFSUBR (Fselected_window); |
6150 DEFSUBR (Flast_nonminibuf_window); | 6166 DEFSUBR (Flast_nonminibuf_window); |
6151 DEFSUBR (Fminibuffer_window); | 6167 DEFSUBR (Fminibuffer_window); |
6152 DEFSUBR (Fwindow_minibuffer_p); | 6168 DEFSUBR (Fwindow_minibuffer_p); |
6153 DEFSUBR (Fwindowp); | 6169 DEFSUBR (Fwindowp); |