aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-06-10 12:52:05 -0700
committerPaul Eggert2011-06-10 12:52:05 -0700
commit46a4ce9efbb12a47ca2cb756b271de06180923cd (patch)
tree9ad032f6f54c15327eab8bf67366b587cfa4e94d /src
parent332905285a095c175a18c19813923ead751cfaec (diff)
downloademacs-46a4ce9efbb12a47ca2cb756b271de06180923cd.tar.gz
emacs-46a4ce9efbb12a47ca2cb756b271de06180923cd.zip
* window.c: Fix minor problems reported by GCC 4.6.0.
(window_deletion_count, delete_deletable_window): Remove; unused. (window_body_lines): Now static. (Fdelete_other_windows_internal): Mark vars as initialized. Make sure 'resize_failed' is initialized. (run_window_configuration_change_hook): Rename local to avoid shadowing. (resize_window_apply): Remove unused local. * window.h (delete_deletable_window): Remove decl.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/window.c29
-rw-r--r--src/window.h1
3 files changed, 18 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 18f06347c43..60669c3719c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,14 @@
12011-06-10 Paul Eggert <eggert@cs.ucla.edu> 12011-06-10 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * window.c: Fix minor problems reported by GCC 4.6.0.
4 (window_deletion_count, delete_deletable_window): Remove; unused.
5 (window_body_lines): Now static.
6 (Fdelete_other_windows_internal): Mark vars as initialized.
7 Make sure 'resize_failed' is initialized.
8 (run_window_configuration_change_hook): Rename local to avoid shadowing.
9 (resize_window_apply): Remove unused local.
10 * window.h (delete_deletable_window): Remove decl.
11
3 * image.c: Fix minor problems reported by GCC 4.6.0. 12 * image.c: Fix minor problems reported by GCC 4.6.0.
4 (gif_load, svg_load_image): Rename locals to avoid shadowing. 13 (gif_load, svg_load_image): Rename locals to avoid shadowing.
5 (imagemagick_load_image): Fix pointer signedness problem by changing 14 (imagemagick_load_image): Fix pointer signedness problem by changing
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. */
122static Lisp_Object Qwindow_configuration_change_hook; 122static Lisp_Object Qwindow_configuration_change_hook;
123 123
124/* Incremented by 1 whenever a window is deleted. */
125static int window_deletion_count;
126
127/* Used by the function window_scroll_pixel_based */ 124/* Used by the function window_scroll_pixel_based */
128static int window_scroll_pixel_based_preserve_x; 125static int window_scroll_pixel_based_preserve_x;
129static int window_scroll_pixel_based_preserve_y; 126static 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
617int 614static int
618window_body_lines (struct window *w) 615window_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. */
1979Lisp_Object
1980delete_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)
3617static void 3606static void
3618resize_window_apply (struct window *w, int horflag) 3607resize_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)
3809DEFUN ("split-window-internal", Fsplit_window_internal, Ssplit_window_internal, 4, 4, 0, 3798DEFUN ("split-window-internal", Fsplit_window_internal, Ssplit_window_internal, 4, 4, 0,
3810 doc: /* Split window OLD. 3799 doc: /* Split window OLD.
3811Second argument TOTAL-SIZE specifies the number of lines or columns of the 3800Second argument TOTAL-SIZE specifies the number of lines or columns of the
3812new window. In any case TOTAL-SIZE must be a positive integer 3801new window. In any case TOTAL-SIZE must be a positive integer
3813 3802
3814Third argument SIDE nil (or `below') specifies that the new window shall 3803Third argument SIDE nil (or `below') specifies that the new window shall
3815be located below WINDOW. SIDE `above' means the new window shall be 3804be located below WINDOW. SIDE `above' means the new window shall be
diff --git a/src/window.h b/src/window.h
index 236464775d3..87d0dc8fb23 100644
--- a/src/window.h
+++ b/src/window.h
@@ -925,7 +925,6 @@ extern void syms_of_window (void);
925extern void keys_of_window (void); 925extern void keys_of_window (void);
926extern void resize_frame_windows (struct frame *, int, int); 926extern void resize_frame_windows (struct frame *, int, int);
927extern int resize_window_check (struct window *, int); 927extern int resize_window_check (struct window *, int);
928extern Lisp_Object delete_deletable_window (Lisp_Object);
929extern Lisp_Object resize_root_window (Lisp_Object, Lisp_Object, Lisp_Object, 928extern Lisp_Object resize_root_window (Lisp_Object, Lisp_Object, Lisp_Object,
930 Lisp_Object); 929 Lisp_Object);
931 930