Fringe cleanup.
[bpt/emacs.git] / src / dispnew.c
index 51aabc9..da6bcc3 100644 (file)
@@ -3300,7 +3300,7 @@ DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0,
 {
   struct frame *f;
 
-  CHECK_LIVE_FRAME (frame, 0);
+  CHECK_LIVE_FRAME (frame);
   f = XFRAME (frame);
 
   /* Ignore redraw requests, if frame has no glyphs yet.
@@ -3724,8 +3724,8 @@ direct_output_forward_char (n)
   row = MATRIX_ROW (w->current_matrix, w->cursor.vpos);
 
   /* Give up if PT is outside of the last known cursor row.  */
-  if (PT <= MATRIX_ROW_START_BYTEPOS (row)
-      || PT >= MATRIX_ROW_END_BYTEPOS (row))
+  if (PT <= MATRIX_ROW_START_CHARPOS (row)
+      || PT >= MATRIX_ROW_END_CHARPOS (row))
     return 0;
 
   set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
@@ -5740,12 +5740,12 @@ mode_line_string (w, x, y, mode_line_p, charpos)
 
   if (row->mode_line_p && row->enabled_p)
     {
-      /* The mode lines are displayed over scroll bars and bitmap
-        areas, and X is window-relative.  Correct X by the scroll bar
-        and bitmap area width.  */
+      /* The mode lines are displayed over scroll bars and fringes,
+        and X is window-relative.  Correct X by the scroll bar
+        and fringe width.  */
       if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f))
        x += FRAME_SCROLL_BAR_COLS (f) * CANON_X_UNIT (f);
-      x += FRAME_LEFT_FLAGS_AREA_WIDTH (f);
+      x += FRAME_LEFT_FRINGE_WIDTH (f);
 
       /* Find the glyph under X.  If we find one with a string object,
          it's the one we were looking for.  */
@@ -5973,8 +5973,9 @@ change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe)
   }
 
   adjust_glyphs (f);
-  SET_FRAME_GARBAGED (f);
   calculate_costs (f);
+  SET_FRAME_GARBAGED (f);
+  f->resized_p = 1;
 
   UNBLOCK_INPUT;
 
@@ -6022,7 +6023,7 @@ Control characters in STRING will have terminal-dependent effects.  */)
      Lisp_Object string;
 {
   /* ??? Perhaps we should do something special for multibyte strings here.  */
-  CHECK_STRING (string, 0);
+  CHECK_STRING (string);
   fwrite (XSTRING (string)->data, 1, STRING_BYTES (XSTRING (string)), stdout);
   fflush (stdout);
   if (termscript)
@@ -6089,7 +6090,7 @@ Emacs was built without floating point support.
   if (NILP (milliseconds))
     XSETINT (milliseconds, 0);
   else
-    CHECK_NUMBER (milliseconds, 1);
+    CHECK_NUMBER (milliseconds);
   usec = XINT (milliseconds) * 1000;
 
   {
@@ -6198,7 +6199,7 @@ sit_for (sec, usec, reading, display, initial_display)
 
 
 DEFUN ("sit-for", Fsit_for, Ssit_for, 1, 3, 0,
-  doc: /* Perform redisplay, then wait for SECONDS seconds or until input is available.
+       doc: /* Perform redisplay, then wait for SECONDS seconds or until input is available.
 SECONDS may be a floating-point value, meaning that you can wait for a
 fraction of a second.  Optional second arg MILLISECONDS specifies an
 additional wait period, in milliseconds; this may be useful if your
@@ -6216,7 +6217,7 @@ Value is t if waited the full time with no input arriving.  */)
   if (NILP (milliseconds))
     XSETINT (milliseconds, 0);
   else
-    CHECK_NUMBER (milliseconds, 1);
+    CHECK_NUMBER (milliseconds);
   usec = XINT (milliseconds) * 1000;
 
   {
@@ -6249,7 +6250,7 @@ static Lisp_Object frame_and_buffer_state;
 
 DEFUN ("frame-or-buffer-changed-p", Fframe_or_buffer_changed_p,
        Sframe_or_buffer_changed_p, 0, 0, 0,
-  doc: /* Return non-nil if the frame and buffer state appears to have changed.
+       doc: /* Return non-nil if the frame and buffer state appears to have changed.
 The state variable is an internal vector containing all frames and buffers,
 aside from buffers whose names start with space,
 along with the buffers' read-only and modified flags, which allows a fast
@@ -6535,7 +6536,7 @@ don't show a cursor.  */)
       if (NILP (window))
        window = selected_window;
       else
-       CHECK_WINDOW (window, 2);
+       CHECK_WINDOW (window);
       
       XWINDOW (window)->cursor_off_p = NILP (show);
     }
@@ -6546,7 +6547,7 @@ don't show a cursor.  */)
 
 DEFUN ("internal-show-cursor-p", Finternal_show_cursor_p,
        Sinternal_show_cursor_p, 0, 1, 0,
-   doc: /* Value is non-nil if next redisplay will display a cursor in WINDOW.
+       doc: /* Value is non-nil if next redisplay will display a cursor in WINDOW.
 WINDOW nil or omitted means report on the selected window.  */)
      (window)
      Lisp_Object window;
@@ -6556,7 +6557,7 @@ WINDOW nil or omitted means report on the selected window.  */)
   if (NILP (window))
     window = selected_window;
   else
-    CHECK_WINDOW (window, 2);
+    CHECK_WINDOW (window);
   
   w = XWINDOW (window);
   return w->cursor_off_p ? Qnil : Qt;    
@@ -6594,36 +6595,39 @@ syms_of_display ()
   staticpro (&Qredisplay_dont_pause);
 
   DEFVAR_INT ("baud-rate", &baud_rate,
-    doc: /* *The output baud rate of the terminal.
+             doc: /* *The output baud rate of the terminal.
 On most systems, changing this value will affect the amount of padding
 and the other strategic decisions made during redisplay.  */);
   
   DEFVAR_BOOL ("inverse-video", &inverse_video,
-    doc: /* *Non-nil means invert the entire frame display.
+              doc: /* *Non-nil means invert the entire frame display.
 This means everything is in inverse video which otherwise would not be.  */);
   
   DEFVAR_BOOL ("visible-bell", &visible_bell,
-    doc: /* *Non-nil means try to flash the frame to represent a bell.  */);
+              doc: /* *Non-nil means try to flash the frame to represent a bell.
+
+See also `ring-bell-function'.  */);
   
   DEFVAR_BOOL ("no-redraw-on-reenter", &no_redraw_on_reenter,
-    doc: /* *Non-nil means no need to redraw entire frame after suspending.
+              doc: /* *Non-nil means no need to redraw entire frame after suspending.
 A non-nil value is useful if the terminal can automatically preserve
 Emacs's frame display when you reenter Emacs.
 It is up to you to set this variable if your terminal can do that.  */);
   
   DEFVAR_LISP ("window-system", &Vwindow_system,
-    doc: /* A symbol naming the window-system under which Emacs is running
-\(such as `x'), or nil if emacs is running on an ordinary terminal.  */);
+              doc: /* Name of window system that Emacs is displaying through.
+The value is a symbol--for instance, `x' for X windows.
+The value is nil if Emacs is using a text-only terminal.  */);
   
   DEFVAR_LISP ("window-system-version", &Vwindow_system_version,
-    doc: /* The version number of the window system in use.
+              doc: /* The version number of the window system in use.
 For X windows, this is 10 or 11.  */);
   
   DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area,
-    doc: /* Non-nil means put cursor in minibuffer, at end of any message there.  */);
+              doc: /* Non-nil means put cursor in minibuffer, at end of any message there.  */);
   
   DEFVAR_LISP ("glyph-table", &Vglyph_table,
-    doc: /* Table defining how to output a glyph code to the frame.
+              doc: /* Table defining how to output a glyph code to the frame.
 If not nil, this is a vector indexed by glyph code to define the glyph.
 Each element can be:
  integer: a glyph code which this glyph is an alias for.
@@ -6634,12 +6638,12 @@ Each element can be:
   Vglyph_table = Qnil;
 
   DEFVAR_LISP ("standard-display-table", &Vstandard_display_table,
-    doc: /* Display table to use for buffers that specify none.
+              doc: /* Display table to use for buffers that specify none.
 See `buffer-display-table' for more information.  */);
   Vstandard_display_table = Qnil;
 
   DEFVAR_BOOL ("redisplay-dont-pause", &redisplay_dont_pause,
-    doc: /* *Non-nil means update isn't paused when input is detected.  */);
+              doc: /* *Non-nil means update isn't paused when input is detected.  */);
   redisplay_dont_pause = 0;
 
   /* Initialize `window-system', unless init_display already decided it.  */