Merge from emacs--devo--0
[bpt/emacs.git] / src / composite.c
index b688c4b..d44acf2 100644 (file)
@@ -1,7 +1,7 @@
 /* Composite sequence support.
    Copyright (C) 2001, 2002, 2003, 2004, 2005,
-                 2006 Free Software Foundation, Inc.
-   Copyright (C) 1999
+                 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H14PRO021
    Copyright (C) 2003, 2006
@@ -366,7 +366,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string)
       float leftmost = 0.0, rightmost;
 
       ch = XINT (key_contents[0]);
-      rightmost = CHAR_WIDTH (ch);
+      rightmost = ch != '\t' ? CHAR_WIDTH (ch) : 1;
 
       for (i = 1; i < glyph_len; i += 2)
        {
@@ -376,7 +376,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string)
 
          rule = XINT (key_contents[i]);
          ch = XINT (key_contents[i + 1]);
-         this_width = CHAR_WIDTH (ch);
+         this_width = ch != '\t' ? CHAR_WIDTH (ch) : 1;
 
          /* A composition rule is specified by an integer value
             that encodes global and new reference points (GREF and