diff options
| author | Miles Bader | 2006-06-20 07:35:06 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-06-20 07:35:06 +0000 |
| commit | 7ffefb0856637762050ca248013d2b2f1cf7554e (patch) | |
| tree | aadd0178b0d1f637ea0a8fffce9c7a3fa1cf4dc0 /src | |
| parent | 47067d3ec0ec1eea6ba561306349576a890cc274 (diff) | |
| parent | 1e0fd4cd530948277283d0fe7b07e00a73fee934 (diff) | |
| download | emacs-7ffefb0856637762050ca248013d2b2f1cf7554e.tar.gz emacs-7ffefb0856637762050ca248013d2b2f1cf7554e.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 314-319)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 107)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-78
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/syntax.c | 14 | ||||
| -rw-r--r-- | src/window.c | 87 |
3 files changed, 94 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c4c798e6f77..3e523d28f8d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2006-06-19 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * window.c (size_window): New arg FIRST_ONLY. All callers changed. | ||
| 4 | (adjust_window_trailing_edge): Specially compute FIRST_PARALLEL | ||
| 5 | for the case of a top-level window and the following minibuffer. | ||
| 6 | Don't exit because of no `next' when there is a parent. | ||
| 7 | Use the FIRST_ONLY feature when resizing following windows. | ||
| 8 | |||
| 9 | * syntax.c (init_syntax_once): Give most control chars' syntax Spunct. | ||
| 10 | |||
| 1 | 2006-06-17 Kim F. Storm <storm@cua.dk> | 11 | 2006-06-17 Kim F. Storm <storm@cua.dk> |
| 2 | 12 | ||
| 3 | * dispnew.c (update_frame): Check for input pending on entry. | 13 | * dispnew.c (update_frame): Check for input pending on entry. |
diff --git a/src/syntax.c b/src/syntax.c index 3f6058e3b1a..4f5481ca111 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -3346,6 +3346,20 @@ init_syntax_once () | |||
| 3346 | 3346 | ||
| 3347 | Vstandard_syntax_table = Fmake_char_table (Qsyntax_table, temp); | 3347 | Vstandard_syntax_table = Fmake_char_table (Qsyntax_table, temp); |
| 3348 | 3348 | ||
| 3349 | /* Control characters should not be whitespace. */ | ||
| 3350 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Spunct]; | ||
| 3351 | for (i = 0; i <= ' ' - 1; i++) | ||
| 3352 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); | ||
| 3353 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 0177, temp); | ||
| 3354 | |||
| 3355 | /* Except that a few really are whitespace. */ | ||
| 3356 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Swhitespace]; | ||
| 3357 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, ' ', temp); | ||
| 3358 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\t', temp); | ||
| 3359 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\n', temp); | ||
| 3360 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 015, temp); | ||
| 3361 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 014, temp); | ||
| 3362 | |||
| 3349 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Sword]; | 3363 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Sword]; |
| 3350 | for (i = 'a'; i <= 'z'; i++) | 3364 | for (i = 'a'; i <= 'z'; i++) |
| 3351 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); | 3365 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); |
diff --git a/src/window.c b/src/window.c index 6a1edb24efb..5a03296a18a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -63,7 +63,7 @@ static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int)); | |||
| 63 | static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); | 63 | static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); |
| 64 | static int window_min_size_1 P_ ((struct window *, int)); | 64 | static int window_min_size_1 P_ ((struct window *, int)); |
| 65 | static int window_min_size P_ ((struct window *, int, int, int *)); | 65 | static int window_min_size P_ ((struct window *, int, int, int *)); |
| 66 | static void size_window P_ ((Lisp_Object, int, int, int)); | 66 | static void size_window P_ ((Lisp_Object, int, int, int, int, int)); |
| 67 | static int freeze_window_start P_ ((struct window *, void *)); | 67 | static int freeze_window_start P_ ((struct window *, void *)); |
| 68 | static int window_fixed_size_p P_ ((struct window *, int, int)); | 68 | static int window_fixed_size_p P_ ((struct window *, int, int)); |
| 69 | static void enlarge_window P_ ((Lisp_Object, int, int)); | 69 | static void enlarge_window P_ ((Lisp_Object, int, int)); |
| @@ -2826,17 +2826,23 @@ shrink_windows (total, size, nchildren, shrinkable, | |||
| 2826 | 2826 | ||
| 2827 | /* Set WINDOW's height or width to SIZE. WIDTH_P non-zero means set | 2827 | /* Set WINDOW's height or width to SIZE. WIDTH_P non-zero means set |
| 2828 | WINDOW's width. Resize WINDOW's children, if any, so that they | 2828 | WINDOW's width. Resize WINDOW's children, if any, so that they |
| 2829 | keep their proportionate size relative to WINDOW. Propagate | 2829 | keep their proportionate size relative to WINDOW. |
| 2830 | WINDOW's top or left edge position to children. Delete windows | 2830 | |
| 2831 | that become too small unless NODELETE_P is non-zero. | 2831 | If FIRST_ONLY is 1, change only the first of WINDOW's children when |
| 2832 | they are in series. If LAST_ONLY is 1, change only the last of | ||
| 2833 | WINDOW's children when they are in series. | ||
| 2834 | |||
| 2835 | Propagate WINDOW's top or left edge position to children. Delete | ||
| 2836 | windows that become too small unless NODELETE_P is non-zero. | ||
| 2832 | 2837 | ||
| 2833 | If NODELETE_P is 2, that means we do delete windows that are | 2838 | If NODELETE_P is 2, that means we do delete windows that are |
| 2834 | too small, even if they were too small before! */ | 2839 | too small, even if they were too small before! */ |
| 2835 | 2840 | ||
| 2836 | static void | 2841 | static void |
| 2837 | size_window (window, size, width_p, nodelete_p) | 2842 | size_window (window, size, width_p, nodelete_p, first_only, last_only) |
| 2838 | Lisp_Object window; | 2843 | Lisp_Object window; |
| 2839 | int size, width_p, nodelete_p; | 2844 | int size, width_p, nodelete_p; |
| 2845 | int first_only, last_only; | ||
| 2840 | { | 2846 | { |
| 2841 | struct window *w = XWINDOW (window); | 2847 | struct window *w = XWINDOW (window); |
| 2842 | struct window *c; | 2848 | struct window *c; |
| @@ -2911,6 +2917,7 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2911 | 2917 | ||
| 2912 | if (!NILP (*sideward)) | 2918 | if (!NILP (*sideward)) |
| 2913 | { | 2919 | { |
| 2920 | /* We have a chain of parallel siblings whose size should all change. */ | ||
| 2914 | for (child = *sideward; !NILP (child); child = c->next) | 2921 | for (child = *sideward; !NILP (child); child = c->next) |
| 2915 | { | 2922 | { |
| 2916 | c = XWINDOW (child); | 2923 | c = XWINDOW (child); |
| @@ -2918,9 +2925,45 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2918 | c->left_col = w->left_col; | 2925 | c->left_col = w->left_col; |
| 2919 | else | 2926 | else |
| 2920 | c->top_line = w->top_line; | 2927 | c->top_line = w->top_line; |
| 2921 | size_window (child, size, width_p, nodelete_p); | 2928 | size_window (child, size, width_p, nodelete_p, |
| 2929 | first_only, last_only); | ||
| 2922 | } | 2930 | } |
| 2923 | } | 2931 | } |
| 2932 | else if (!NILP (*forward) && last_only) | ||
| 2933 | { | ||
| 2934 | /* Change the last in a series of siblings. */ | ||
| 2935 | Lisp_Object last_child; | ||
| 2936 | int child_size; | ||
| 2937 | |||
| 2938 | for (child = *forward; !NILP (child); child = c->next) | ||
| 2939 | { | ||
| 2940 | c = XWINDOW (child); | ||
| 2941 | last_child = child; | ||
| 2942 | } | ||
| 2943 | |||
| 2944 | child_size = XINT (width_p ? c->total_cols : c->total_lines); | ||
| 2945 | size_window (last_child, | ||
| 2946 | size - old_size + child_size, | ||
| 2947 | width_p, nodelete_p, first_only, last_only); | ||
| 2948 | } | ||
| 2949 | else if (!NILP (*forward) && first_only) | ||
| 2950 | { | ||
| 2951 | /* Change the first in a series of siblings. */ | ||
| 2952 | int child_size; | ||
| 2953 | |||
| 2954 | child = *forward; | ||
| 2955 | c = XWINDOW (child); | ||
| 2956 | |||
| 2957 | if (width_p) | ||
| 2958 | c->left_col = w->left_col; | ||
| 2959 | else | ||
| 2960 | c->top_line = w->top_line; | ||
| 2961 | |||
| 2962 | child_size = XINT (width_p ? c->total_cols : c->total_lines); | ||
| 2963 | size_window (child, | ||
| 2964 | size - old_size + child_size, | ||
| 2965 | width_p, nodelete_p, first_only, last_only); | ||
| 2966 | } | ||
| 2924 | else if (!NILP (*forward)) | 2967 | else if (!NILP (*forward)) |
| 2925 | { | 2968 | { |
| 2926 | int fixed_size, each, extra, n; | 2969 | int fixed_size, each, extra, n; |
| @@ -2928,7 +2971,7 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2928 | int last_pos, first_pos, nchildren, total; | 2971 | int last_pos, first_pos, nchildren, total; |
| 2929 | int *new_sizes = NULL; | 2972 | int *new_sizes = NULL; |
| 2930 | 2973 | ||
| 2931 | /* Determine the fixed-size portion of the this window, and the | 2974 | /* Determine the fixed-size portion of this window, and the |
| 2932 | number of child windows. */ | 2975 | number of child windows. */ |
| 2933 | fixed_size = nchildren = nfixed = total = 0; | 2976 | fixed_size = nchildren = nfixed = total = 0; |
| 2934 | for (child = *forward; !NILP (child); child = c->next, ++nchildren) | 2977 | for (child = *forward; !NILP (child); child = c->next, ++nchildren) |
| @@ -2991,7 +3034,7 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2991 | /* Set new height. Note that size_window also propagates | 3034 | /* Set new height. Note that size_window also propagates |
| 2992 | edge positions to children, so it's not a no-op if we | 3035 | edge positions to children, so it's not a no-op if we |
| 2993 | didn't change the child's size. */ | 3036 | didn't change the child's size. */ |
| 2994 | size_window (child, new_size, width_p, 1); | 3037 | size_window (child, new_size, width_p, 1, first_only, last_only); |
| 2995 | 3038 | ||
| 2996 | /* Remember the bottom/right edge position of this child; it | 3039 | /* Remember the bottom/right edge position of this child; it |
| 2997 | will be used to set the top/left edge of the next child. */ | 3040 | will be used to set the top/left edge of the next child. */ |
| @@ -3010,7 +3053,7 @@ size_window (window, size, width_p, nodelete_p) | |||
| 3010 | int child_size; | 3053 | int child_size; |
| 3011 | c = XWINDOW (child); | 3054 | c = XWINDOW (child); |
| 3012 | child_size = width_p ? XINT (c->total_cols) : XINT (c->total_lines); | 3055 | child_size = width_p ? XINT (c->total_cols) : XINT (c->total_lines); |
| 3013 | size_window (child, child_size, width_p, 2); | 3056 | size_window (child, child_size, width_p, 2, first_only, last_only); |
| 3014 | } | 3057 | } |
| 3015 | } | 3058 | } |
| 3016 | } | 3059 | } |
| @@ -3026,7 +3069,7 @@ set_window_height (window, height, nodelete) | |||
| 3026 | int height; | 3069 | int height; |
| 3027 | int nodelete; | 3070 | int nodelete; |
| 3028 | { | 3071 | { |
| 3029 | size_window (window, height, 0, nodelete); | 3072 | size_window (window, height, 0, nodelete, 0, 0); |
| 3030 | } | 3073 | } |
| 3031 | 3074 | ||
| 3032 | 3075 | ||
| @@ -3041,7 +3084,7 @@ set_window_width (window, width, nodelete) | |||
| 3041 | int width; | 3084 | int width; |
| 3042 | int nodelete; | 3085 | int nodelete; |
| 3043 | { | 3086 | { |
| 3044 | size_window (window, width, 1, nodelete); | 3087 | size_window (window, width, 1, nodelete, 0, 0); |
| 3045 | } | 3088 | } |
| 3046 | 3089 | ||
| 3047 | /* Change window heights in windows rooted in WINDOW by N lines. */ | 3090 | /* Change window heights in windows rooted in WINDOW by N lines. */ |
| @@ -4281,8 +4324,8 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4281 | 4324 | ||
| 4282 | if (NILP (window)) | 4325 | if (NILP (window)) |
| 4283 | { | 4326 | { |
| 4284 | /* This can happen if WINDOW on the previous iteration was | 4327 | /* This happens if WINDOW on the previous iteration was |
| 4285 | at top level of the tree and we did not exit. */ | 4328 | at top level of the window tree. */ |
| 4286 | Fset_window_configuration (old_config); | 4329 | Fset_window_configuration (old_config); |
| 4287 | error ("Specified window edge is fixed"); | 4330 | error ("Specified window edge is fixed"); |
| 4288 | } | 4331 | } |
| @@ -4296,6 +4339,14 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4296 | { | 4339 | { |
| 4297 | if (! NILP (parent) && !NILP (XWINDOW (parent)->vchild)) | 4340 | if (! NILP (parent) && !NILP (XWINDOW (parent)->vchild)) |
| 4298 | first_parallel = XWINDOW (parent)->vchild; | 4341 | first_parallel = XWINDOW (parent)->vchild; |
| 4342 | else if (NILP (parent) && !NILP (p->next)) | ||
| 4343 | { | ||
| 4344 | /* Handle the vertical chain of main window and minibuffer | ||
| 4345 | which has no parent. */ | ||
| 4346 | first_parallel = window; | ||
| 4347 | while (! NILP (XWINDOW (first_parallel)->prev)) | ||
| 4348 | first_parallel = XWINDOW (first_parallel)->prev; | ||
| 4349 | } | ||
| 4299 | } | 4350 | } |
| 4300 | else | 4351 | else |
| 4301 | { | 4352 | { |
| @@ -4304,8 +4355,10 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4304 | } | 4355 | } |
| 4305 | 4356 | ||
| 4306 | /* If this level's succession is in the desired dimension, | 4357 | /* If this level's succession is in the desired dimension, |
| 4307 | and this window is the last one, its trailing edge is fixed. */ | 4358 | and this window is the last one, and there is no higher level, |
| 4308 | if (NILP (XWINDOW (window)->next) && NILP (first_parallel)) | 4359 | its trailing edge is fixed. */ |
| 4360 | if (NILP (XWINDOW (window)->next) && NILP (first_parallel) | ||
| 4361 | && NILP (parent)) | ||
| 4309 | { | 4362 | { |
| 4310 | Fset_window_configuration (old_config); | 4363 | Fset_window_configuration (old_config); |
| 4311 | error ("Specified window edge is fixed"); | 4364 | error ("Specified window edge is fixed"); |
| @@ -4347,7 +4400,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4347 | XSETINT (CURBEG (p->next), | 4400 | XSETINT (CURBEG (p->next), |
| 4348 | XINT (CURBEG (p->next)) + delta); | 4401 | XINT (CURBEG (p->next)) + delta); |
| 4349 | size_window (p->next, XINT (CURSIZE (p->next)) - delta, | 4402 | size_window (p->next, XINT (CURSIZE (p->next)) - delta, |
| 4350 | horiz_flag, 0); | 4403 | horiz_flag, 0, 1, 0); |
| 4351 | break; | 4404 | break; |
| 4352 | } | 4405 | } |
| 4353 | } | 4406 | } |
| @@ -4359,7 +4412,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4359 | child = XWINDOW (child)->next) | 4412 | child = XWINDOW (child)->next) |
| 4360 | if (! EQ (child, window)) | 4413 | if (! EQ (child, window)) |
| 4361 | size_window (child, XINT (CURSIZE (child)) + delta, | 4414 | size_window (child, XINT (CURSIZE (child)) + delta, |
| 4362 | horiz_flag, 0); | 4415 | horiz_flag, 0, 0, 1); |
| 4363 | 4416 | ||
| 4364 | window = parent; | 4417 | window = parent; |
| 4365 | } | 4418 | } |