diff options
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/src/window.c b/src/window.c index 9a0955955fa..f35815d757c 100644 --- a/src/window.c +++ b/src/window.c @@ -2209,13 +2209,13 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame case DELETE_BUFFER_WINDOWS: if (EQ (w->buffer, obj)) { - struct frame *f = XFRAME (WINDOW_FRAME (w)); + struct frame *fr = XFRAME (WINDOW_FRAME (w)); /* If this window is dedicated, and in a frame of its own, kill the frame. */ - if (EQ (window, FRAME_ROOT_WINDOW (f)) + if (EQ (window, FRAME_ROOT_WINDOW (fr)) && !NILP (w->dedicated) - && other_visible_frames (f)) + && other_visible_frames (fr)) { /* Skip the other windows on this frame. There might be one, the minibuffer! */ @@ -2267,16 +2267,16 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame if (EQ (w->buffer, obj)) { Lisp_Object buffer; - struct frame *f = XFRAME (w->frame); + struct frame *fr = XFRAME (w->frame); /* Find another buffer to show in this window. */ buffer = Fother_buffer (obj, Qnil, w->frame); /* If this window is dedicated, and in a frame of its own, kill the frame. */ - if (EQ (window, FRAME_ROOT_WINDOW (f)) + if (EQ (window, FRAME_ROOT_WINDOW (fr)) && !NILP (w->dedicated) - && other_visible_frames (f)) + && other_visible_frames (fr)) { /* Skip the other windows on this frame. There might be one, the minibuffer! */ @@ -2290,11 +2290,11 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame } else if (!NILP (w->dedicated) && !NILP (w->parent)) { - Lisp_Object window; - XSETWINDOW (window, w); + Lisp_Object window_to_delete; + XSETWINDOW (window_to_delete, w); /* If this window is dedicated and not the only window in its frame, then kill it. */ - Fdelete_window (window); + Fdelete_window (window_to_delete); } else { @@ -3124,7 +3124,7 @@ size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int firs } else if (!NILP (*forward)) { - int fixed_size, each, extra, n; + int fixed_size, each IF_LINT (= 0), extra IF_LINT (= 0), n; int resize_fixed_p, nfixed; int last_pos, first_pos, nchildren, total; int *new_sizes = NULL; @@ -3170,11 +3170,11 @@ size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int firs last_pos = first_pos; for (n = 0, child = *forward; !NILP (child); child = c->next, ++n) { - int new_size, old_size; + int new_child_size, old_child_size; c = XWINDOW (child); - old_size = WINDOW_TOTAL_SIZE (c, width_p); - new_size = old_size; + old_child_size = WINDOW_TOTAL_SIZE (c, width_p); + new_child_size = old_child_size; /* The top or left edge position of this child equals the bottom or right edge of its predecessor. */ @@ -3186,18 +3186,20 @@ size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int firs /* If this child can be resized, do it. */ if (resize_fixed_p || !window_fixed_size_p (c, width_p, 0)) { - new_size = new_sizes ? new_sizes[n] : old_size + each + extra; + new_child_size = + new_sizes ? new_sizes[n] : old_child_size + each + extra; extra = 0; } /* Set new size. Note that size_window also propagates edge positions to children, so it's not a no-op if we didn't change the child's size. */ - size_window (child, new_size, width_p, 1, first_only, last_only); + size_window (child, new_child_size, width_p, 1, + first_only, last_only); /* Remember the bottom/right edge position of this child; it will be used to set the top/left edge of the next child. */ - last_pos += new_size; + last_pos += new_child_size; } xfree (new_sizes); @@ -3325,12 +3327,12 @@ run_window_configuration_change_hook (struct frame *f) if (!NILP (Flocal_variable_p (Qwindow_configuration_change_hook, buffer))) { - int count = SPECPDL_INDEX (); + int count1 = SPECPDL_INDEX (); record_unwind_protect (select_window_norecord, Fselected_window ()); select_window_norecord (window); run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, buffer)); - unbind_to (count, Qnil); + unbind_to (count1, Qnil); } } } @@ -3602,7 +3604,7 @@ select_frame_norecord (Lisp_Object frame) ? Fselect_frame (frame, Qt) : selected_frame; } -Lisp_Object +static Lisp_Object display_buffer (Lisp_Object buffer, Lisp_Object not_this_window_p, Lisp_Object override_frame) { return call3 (Qdisplay_buffer, buffer, not_this_window_p, override_frame); @@ -4128,7 +4130,7 @@ enlarge_window (Lisp_Object window, int delta, int horiz_flag) { /* If trying to grow this window to or beyond size of the parent, just delete all the sibling windows. */ - Lisp_Object start, tem, next; + Lisp_Object start, tem; start = XWINDOW (parent)->vchild; if (NILP (start)) @@ -4138,9 +4140,9 @@ enlarge_window (Lisp_Object window, int delta, int horiz_flag) tem = XWINDOW (window)->next; while (! NILP (tem)) { - next = XWINDOW (tem)->next; + Lisp_Object next1 = XWINDOW (tem)->next; delete_window (tem); - tem = next; + tem = next1; } /* Delete any siblings that come after WINDOW. @@ -4149,9 +4151,9 @@ enlarge_window (Lisp_Object window, int delta, int horiz_flag) tem = start; while (! EQ (tem, window)) { - next = XWINDOW (tem)->next; + Lisp_Object next1 = XWINDOW (tem)->next; delete_window (tem); - tem = next; + tem = next1; } } else @@ -5529,7 +5531,7 @@ and redisplay normally--don't erase and redraw the frame. */) struct buffer *obuf = current_buffer; int center_p = 0; EMACS_INT charpos, bytepos; - int iarg; + int iarg IF_LINT (= 0); int this_scroll_margin; /* If redisplay is suppressed due to an error, try again. */ @@ -7211,4 +7213,3 @@ keys_of_window (void) initial_define_key (meta_map, Ctl ('V'), "scroll-other-window"); initial_define_key (meta_map, 'v', "scroll-down-command"); } - |