(reset_buffer): Initialize `display_error_modiff'.
[bpt/emacs.git] / src / window.c
index b838618..6ee3086 100644 (file)
@@ -63,7 +63,7 @@ enum window_part
 
 
 Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p;
-Lisp_Object Qwindow_size_fixed, Qleft_fringe, Qright_fringe;
+Lisp_Object Qwindow_size_fixed;
 extern Lisp_Object Qheight, Qwidth;
 
 static int displayed_window_lines P_ ((struct window *));
@@ -511,7 +511,6 @@ coordinates_in_window (w, x, y)
      everywhere.  */
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   int left_x, right_x, top_y, bottom_y;
-  int fringe_width = FRAME_LEFT_FRINGE_WIDTH (f);
   enum window_part part;
   int ux = CANON_X_UNIT (f);
   int x0 = XFASTINT (w->left) * ux;
@@ -584,10 +583,10 @@ coordinates_in_window (w, x, y)
   else if (*y < top_y
           || *y >= bottom_y
           || *x < (left_x
-                   - fringe_width
+                   - FRAME_LEFT_FRINGE_WIDTH (f)
                    - FRAME_LEFT_SCROLL_BAR_WIDTH (f) * ux)
           || *x > (right_x
-                   + fringe_width
+                   + FRAME_RIGHT_FRINGE_WIDTH (f)
                    + FRAME_RIGHT_SCROLL_BAR_WIDTH (f) * ux))
     {
       part = ON_NOTHING;
@@ -597,7 +596,7 @@ coordinates_in_window (w, x, y)
       if (!w->pseudo_window_p
          && !FRAME_HAS_VERTICAL_SCROLL_BARS (f)
          && !WINDOW_RIGHTMOST_P (w)
-         && (abs (*x - right_x - fringe_width) < grabbable_width))
+         && (abs (*x - right_x - FRAME_RIGHT_FRINGE_WIDTH (f)) < grabbable_width))
        {
          part = ON_VERTICAL_BORDER;
        }
@@ -4585,18 +4584,17 @@ and redisplay normally--don't erase and redraw the frame.  */)
          nlines = - XINT (arg) - 1;
          move_it_by_lines (&it, nlines, 1);
 
-         y1 = it.current_y - y0;
-         h = line_bottom_y (&it) - y1;
+         y1 = line_bottom_y (&it);
 
          /* If we can't move down NLINES lines because we hit
             the end of the buffer, count in some empty lines.  */
          if (it.vpos < nlines)
            y1 += (nlines - it.vpos) * CANON_Y_UNIT (it.f);
          
-         y0 = it.last_visible_y - y1 - h;
-         
+         h = window_box_height (w) - (y1 - y0);
+
          start_display (&it, w, pt);
-         move_it_vertically (&it, - y0);
+         move_it_vertically (&it, - h);
          charpos = IT_CHARPOS (it);
          bytepos = IT_BYTEPOS (it);
        }
@@ -5674,11 +5672,6 @@ init_window ()
 void
 syms_of_window ()
 {
-  Qleft_fringe = intern ("left-fringe");
-  staticpro (&Qleft_fringe);
-  Qright_fringe = intern ("right-fringe");
-  staticpro (&Qright_fringe);
-  
   Qwindow_size_fixed = intern ("window-size-fixed");
   staticpro (&Qwindow_size_fixed);