(vc-cvs-after-dir-status, vc-cvs-parse-status): Detect
[bpt/emacs.git] / src / indent.c
index 2d48dc7..b444382 100644 (file)
@@ -1,6 +1,7 @@
 /* Indentation functions.
    Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1998, 2000, 2001,
-                 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+                 2002, 2003, 2004, 2005, 2006, 2007, 2008
+                 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -24,7 +25,7 @@ Boston, MA 02110-1301, USA.  */
 
 #include "lisp.h"
 #include "buffer.h"
-#include "charset.h"
+#include "character.h"
 #include "category.h"
 #include "indent.h"
 #include "keyboard.h"
@@ -291,7 +292,7 @@ check_composition (pos, pos_byte, point, len, len_byte, width)
      int *len, *len_byte, *width;
 {
   Lisp_Object prop;
-  int start, end;
+  EMACS_INT start, end;
   int id;
 
   if (! find_composition (pos, -1, &start, &end, &prop, Qnil)
@@ -327,7 +328,7 @@ check_composition (pos, pos_byte, point, len, len_byte, width)
        if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, c)))              \
          width = XVECTOR (DISP_CHAR_VECTOR (dp, c))->size;             \
        else                                                            \
-         width = WIDTH_BY_CHAR_HEAD (*p);                              \
+         width = CHAR_WIDTH (c);                                       \
        if (width > 1)                                                  \
          wide_column = width;                                          \
       }                                                                        \
@@ -446,9 +447,9 @@ current_column ()
                 next_element_from_display_vector does it.  */
              Lisp_Object entry = AREF (charvec, i);
 
-             if (INTEGERP (entry)
-                 && GLYPH_CHAR_VALID_P (XFASTINT (entry)))
-               c = FAST_GLYPH_CHAR (XFASTINT (entry));
+             if (GLYPH_CODE_P (entry)
+                 && GLYPH_CODE_CHAR_VALID_P (entry))
+               c = GLYPH_CODE_CHAR (entry);
              else
                c = ' ';
            }
@@ -582,12 +583,11 @@ current_column_1 ()
            {
              /* This should be handled the same as
                 next_element_from_display_vector does it.  */
-             Lisp_Object entry;
-             entry = AREF (charvec, i);
+             Lisp_Object entry = AREF (charvec, i);
 
-             if (INTEGERP (entry)
-                 && GLYPH_CHAR_VALID_P (XFASTINT (entry)))
-               c = FAST_GLYPH_CHAR (XFASTINT (entry));
+             if (GLYPH_CODE_P (entry)
+                 && GLYPH_CODE_CHAR_VALID_P (entry))
+               c = GLYPH_CODE_CHAR (entry);
              else
                c = ' ';
 
@@ -1020,13 +1020,11 @@ The return value is the current column.  */)
            {
              /* This should be handled the same as
                 next_element_from_display_vector does it.  */
+             Lisp_Object entry = AREF (charvec, i);
 
-             Lisp_Object entry;
-             entry = AREF (charvec, i);
-
-             if (INTEGERP (entry)
-                 && GLYPH_CHAR_VALID_P (XFASTINT (entry)))
-               c = FAST_GLYPH_CHAR (XFASTINT (entry));
+             if (GLYPH_CODE_P (entry)
+                 && GLYPH_CODE_CHAR_VALID_P (entry))
+               c = GLYPH_CODE_CHAR (entry);
              else
                c = ' ';
 
@@ -1626,9 +1624,9 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
                     next_element_from_display_vector does it.  */
                  Lisp_Object entry = AREF (charvec, i);
 
-                 if (INTEGERP (entry)
-                     && GLYPH_CHAR_VALID_P (XFASTINT (entry)))
-                   c = FAST_GLYPH_CHAR (XFASTINT (entry));
+                 if (GLYPH_CODE_P (entry)
+                     && GLYPH_CODE_CHAR_VALID_P (entry))
+                   c = GLYPH_CODE_CHAR (entry);
                  else
                    c = ' ';
                }