]> code.delx.au - gnu-emacs/blobdiff - src/indent.c
* process.c (wait_reading_process_input): If we're running
[gnu-emacs] / src / indent.c
index bcb3fe6169a47074c2d911b3803d98029211608a..44e3f14be3a5bfd645d4c572cb15da3388452b07 100644 (file)
@@ -116,7 +116,7 @@ current_column ()
   else
     stop = GAP_END_ADDR;
 
-  if (tab_width <= 0 || tab_width > 20) tab_width = 8;
+  if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
 
   col = 0, tab_seen = 0, post_tab = 0;
 
@@ -137,7 +137,7 @@ current_column ()
 
       c = *--ptr;
       if (c >= 040 && c < 0177
-         && (dp == 0 || XTYPE (DISP_CHAR_ROPE (dp, c)) != Lisp_String))
+         && (dp == 0 || XTYPE (DISP_CHAR_VECTOR (dp, c)) != Lisp_Vector))
        {
          col++;
        }
@@ -154,8 +154,8 @@ current_column ()
          col = 0;
          tab_seen = 1;
        }
-      else if (dp != 0 && XTYPE (DISP_CHAR_ROPE (dp, c)) == Lisp_String)
-       col += XSTRING (DISP_CHAR_ROPE (dp, c))->size / sizeof (GLYPH);
+      else if (dp != 0 && XTYPE (DISP_CHAR_VECTOR (dp, c)) == Lisp_Vector)
+       col += XVECTOR (DISP_CHAR_VECTOR (dp, c))->size;
       else
        col += (ctl_arrow && c < 0200) ? 2 : 4;
     }
@@ -197,7 +197,7 @@ even if that goes past COLUMN; by default, MIN is zero.")
   if (fromcol == mincol)
     return make_number (mincol);
 
-  if (tab_width <= 0 || tab_width > 20) tab_width = 8;
+  if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
 
   if (indent_tabs_mode)
     {
@@ -243,7 +243,7 @@ position_indentation (pos)
   register unsigned char *p;
   register unsigned char *stop;
   
-  if (tab_width <= 0 || tab_width > 20) tab_width = 8;
+  if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
   
   stop = &FETCH_CHAR (BUFFER_CEILING_OF (pos)) + 1;
   p = &FETCH_CHAR (pos);
@@ -299,7 +299,7 @@ and if COLUMN is in the middle of a tab character, change it to spaces.")
   int prev_col;
   int c;
 
-  if (tab_width <= 0 || tab_width > 20) tab_width = 8;
+  if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
   CHECK_NATNUM (column, 0);
   goal = XINT (column);
 
@@ -329,8 +329,8 @@ and if COLUMN is in the middle of a tab character, change it to spaces.")
          col += tab_width;
          col = col / tab_width * tab_width;
        }
-      else if (dp != 0 && XTYPE (DISP_CHAR_ROPE (dp, c)) == Lisp_String)
-       col += XSTRING (DISP_CHAR_ROPE (dp, c))->size / sizeof (GLYPH);
+      else if (dp != 0 && XTYPE (DISP_CHAR_VECTOR (dp, c)) == Lisp_Vector)
+       col += XVECTOR (DISP_CHAR_VECTOR (dp, c))->size;
       else if (ctl_arrow && (c < 040 || c == 0177))
         col++;
       else if (c < 040 || c >= 0177)
@@ -396,15 +396,15 @@ struct position val_compute_motion;
    When displaying in window w, a typical formula for WIDTH is:
 
        window_width - 1
-        - (has_vertical_scrollbars
-           ? VERTICAL_SCROLLBAR_WIDTH
+        - (has_vertical_scroll_bars
+           ? VERTICAL_SCROLL_BAR_WIDTH
            : (window_width + window_left != frame_width))
 
        where
          window_width is XFASTINT (w->width),
          window_left is XFASTINT (w->left),
-         has_vertical_scrollbars is
-           FRAME_HAS_VERTICAL_SCROLLBARS (XFRAME (WINDOW_FRAME (window)))
+         has_vertical_scroll_bars is
+           FRAME_HAS_VERTICAL_SCROLL_BARS (XFRAME (WINDOW_FRAME (window)))
          and frame_width = FRAME_WIDTH (XFRAME (window->frame))
 
        Or,
@@ -412,7 +412,7 @@ struct position val_compute_motion;
 
    The `-1' accounts for the continuation-line backslashes; the rest
    accounts for window borders if the window is split vertically, and
-   the scrollbars if the frame supports them.  */
+   the scroll bars if the frame supports them.  */
 
 struct position *
 compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, tab_offset)
@@ -434,10 +434,10 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
        : !NILP (current_buffer->selective_display) ? -1 : 0;
   int prev_vpos, prev_hpos;
   int selective_rlen
-    = (selective && dp && XTYPE (DISP_INVIS_ROPE (dp)) == Lisp_String
-       ? XSTRING (DISP_INVIS_ROPE (dp))->size / sizeof (GLYPH) : 0);
+    = (selective && dp && XTYPE (DISP_INVIS_VECTOR (dp)) == Lisp_Vector
+       ? XVECTOR (DISP_INVIS_VECTOR (dp))->size : 0);
 
-  if (tab_width <= 0 || tab_width > 20) tab_width = 8;
+  if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
   for (pos = from; pos < to; pos++)
     {
       /* Stop if past the target screen position.  */
@@ -450,7 +450,7 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
 
       c = FETCH_CHAR (pos);
       if (c >= 040 && c < 0177
-         && (dp == 0 || XTYPE (DISP_CHAR_ROPE (dp, c)) != Lisp_String))
+         && (dp == 0 || XTYPE (DISP_CHAR_VECTOR (dp, c)) != Lisp_Vector))
        hpos++;
       else if (c == '\t')
        {
@@ -506,8 +506,8 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
                hpos = width;
            }
        }
-      else if (dp != 0 && XTYPE (DISP_CHAR_ROPE (dp, c)) == Lisp_String)
-       hpos += XSTRING (DISP_CHAR_ROPE (dp, c))->size / sizeof (GLYPH);
+      else if (dp != 0 && XTYPE (DISP_CHAR_VECTOR (dp, c)) == Lisp_Vector)
+       hpos += XVECTOR (DISP_CHAR_VECTOR (dp, c))->size;
       else
        hpos += (ctl_arrow && c < 0200) ? 2 : 4;