X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fwindow.c;h=8d78ae865822aec6300bb0df5a223d7eee0577ae;hb=7beac5f08c8f14fd7acd6e8bd4c6545fe6709a11;hp=7790ce7763db66aca23ffe451e2a301730387fad;hpb=2b7371e841478fd7b9bc7e4d9a515e0c26b9ed9a;p=chise%2Fxemacs-chise.git.1 diff --git a/src/window.c b/src/window.c index 7790ce7..8d78ae8 100644 --- a/src/window.c +++ b/src/window.c @@ -111,14 +111,14 @@ Lisp_Object Vtemp_buffer_show_function; Lisp_Object Vtemp_buffer_show_hook; /* If a window gets smaller than either of these, it is removed. */ -int window_min_height; -int window_min_width; +Fixnum window_min_height; +Fixnum window_min_width; /* Hook run at end of temp_output_buffer_show. */ Lisp_Object Qtemp_buffer_show_hook; /* Number of lines of continuity in scrolling by screenfuls. */ -int next_screen_context_lines; +Fixnum next_screen_context_lines; /* List of freed window configurations with 1 - 10 windows. */ static Lisp_Object Vwindow_configuration_free_list[10]; @@ -4331,7 +4331,7 @@ window_scroll (Lisp_Object window, Lisp_Object count, int direction, && Dynarr_length (dla) >= (1 + modeline) && - (dl->ascent - dl->top_clip) - fheight * value > 0) + (dl->ascent - dl->top_clip) > fheight * value) { WINDOW_TEXT_TOP_CLIP (w) += value * fheight; MARK_WINDOWS_CHANGED (w); @@ -4513,6 +4513,11 @@ When calling from a program, supply an integer as argument or nil. On attempt to scroll past end of buffer, `end-of-buffer' is signaled. On attempt to scroll past beginning of buffer, `beginning-of-buffer' is signaled. + +The characters that are moved over may be added to the current selection +\(i.e. active region) if the Shift key is held down, a motion key is used +to invoke this command, and `shifted-motion-keys-select-region' is t; see +the documentation for this variable for more details. */ (count)) { @@ -4528,6 +4533,11 @@ When calling from a program, supply a number as argument or nil. On attempt to scroll past end of buffer, `end-of-buffer' is signaled. On attempt to scroll past beginning of buffer, `beginning-of-buffer' is signaled. + +The characters that are moved over may be added to the current selection +\(i.e. active region) if the Shift key is held down, a motion key is used +to invoke this command, and `shifted-motion-keys-select-region' is t; see +the documentation for this variable for more details. */ (count)) { @@ -4600,6 +4610,11 @@ showing that buffer, popping the buffer up if necessary. DEFUN ("scroll-left", Fscroll_left, 0, 1, "_P", /* Scroll selected window display COUNT columns left. Default for COUNT is window width minus 2. + +The characters that are moved over may be added to the current selection +\(i.e. active region) if the Shift key is held down, a motion key is used +to invoke this command, and `shifted-motion-keys-select-region' is t; see +the documentation for this variable for more details. */ (count)) { @@ -4615,6 +4630,11 @@ Default for COUNT is window width minus 2. DEFUN ("scroll-right", Fscroll_right, 0, 1, "_P", /* Scroll selected window display COUNT columns right. Default for COUNT is window width minus 2. + +The characters that are moved over may be added to the current selection +\(i.e. active region) if the Shift key is held down, a motion key is used +to invoke this command, and `shifted-motion-keys-select-region' is t; see +the documentation for this variable for more details. */ (count)) { @@ -5006,7 +5026,7 @@ struct window_config /* Record the values of window-min-width and window-min-height so that window sizes remain consistent with them. */ int min_width, min_height; - int saved_windows_count; + unsigned int saved_windows_count; /* Zero-sized arrays aren't ANSI C */ struct saved_window saved_windows[1]; }; @@ -5021,7 +5041,7 @@ static Lisp_Object mark_window_config (Lisp_Object obj) { struct window_config *config = XWINDOW_CONFIGURATION (obj); - int i; + unsigned int i; mark_object (config->current_window); mark_object (config->current_buffer); mark_object (config->minibuffer_scroll_window); @@ -5050,12 +5070,11 @@ mark_window_config (Lisp_Object obj) return Qnil; } -static size_t -sizeof_window_config_for_n_windows (int n) +inline static size_t +sizeof_window_config_for_n_windows (unsigned int n) { - return (sizeof (struct window_config) + - /* n - 1 because zero-sized arrays aren't ANSI C */ - (n - 1) *sizeof (struct saved_window)); + return FLEXIBLE_ARRAY_STRUCT_SIZEOF (struct window_config, + struct saved_window, saved_windows, n); } static size_t @@ -5120,7 +5139,7 @@ static int window_config_equal (Lisp_Object conf1, Lisp_Object conf2) { struct window_config *fig1, *fig2; - int i; + unsigned int i; /* First check if they are truly the same. */ if (EQ (conf1, conf2)) @@ -5175,7 +5194,7 @@ mark_windows_in_use (struct frame *f, int mark) static Lisp_Object free_window_configuration (Lisp_Object window_config) { - int i; + unsigned int i; struct window_config *config = XWINDOW_CONFIGURATION (window_config); /* Free all the markers. It's not completely necessary that @@ -5227,7 +5246,7 @@ by `current-window-configuration' (which see). struct window_config *config; struct saved_window *p; Lisp_Object new_current_buffer; - int k; + unsigned int k; Lisp_Object frame; struct frame *f; struct gcpro gcpro1; @@ -5725,7 +5744,7 @@ delete_all_subwindows (struct window *w) } -static int +static unsigned int count_windows (struct window *window) { return 1 + @@ -5840,7 +5859,7 @@ its value is -not- saved. Lisp_Object result; struct frame *f = decode_frame (frame); struct window_config *config; - int n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f))); + unsigned int n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f))); int minibuf_height; int real_font_height; @@ -6152,7 +6171,7 @@ syms_of_window (void) void reinit_vars_of_window (void) { - int i; + unsigned int i; /* Make sure all windows get marked */ minibuf_window = Qnil; staticpro_nodump (&minibuf_window); @@ -6312,6 +6331,9 @@ This is a specifier; use `set-specifier' to change it. #ifdef HAVE_TTY fb = Fcons (Fcons (list1 (Qtty), make_int (1)), fb); #endif +#ifdef HAVE_GTK + fb = Fcons (Fcons (list1 (Qgtk), make_int (3)), fb); +#endif #ifdef HAVE_X_WINDOWS fb = Fcons (Fcons (list1 (Qx), make_int (3)), fb); #endif @@ -6346,6 +6368,9 @@ This is a specifier; use `set-specifier' to change it. Should not the same value be the fallback under X? - kkm */ fb = Fcons (Fcons (list1 (Qx), make_int (2)), fb); #endif +#ifdef HAVE_GTK + fb = Fcons (Fcons (list1 (Qgtk), Qzero), fb); +#endif #ifdef HAVE_MS_WINDOWS fb = Fcons (Fcons (list1 (Qmswindows), Qzero), fb); #endif