(scan_lists): Follow coding convention.
[bpt/emacs.git] / src / composite.h
index 08463af..95f2fc1 100644 (file)
@@ -1,7 +1,7 @@
 /* Header for composite sequence handler.
    Copyright (C) 2001, 2002, 2003, 2004, 2005,
-                 2006 Free Software Foundation, Inc.
-   Copyright (C) 1997
+                 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H14PRO021
    Copyright (C) 2003, 2006
@@ -12,7 +12,7 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -40,10 +40,8 @@ enum composition_method {
   COMPOSITION_WITH_ALTCHARS,
   /* Compose by specified composition rules with alternate characters.  */
   COMPOSITION_WITH_RULE_ALTCHARS,
-#ifdef USE_FONT_BACKEND
   /* Compose by specified lispy glyph-string.  */
   COMPOSITION_WITH_GLYPH_STRING,
-#endif  /* USE_FONT_BACKEND */
   /* This is not a method.  */
   COMPOSITION_NO
 };
@@ -61,7 +59,7 @@ enum composition_method {
 /* Temporary variable used only in the following macros.  */
 extern Lisp_Object composition_temp;
 
-/* Return 1 iff the composition is already registered.  */
+/* Return 1 if the composition is already registered.  */
 #define COMPOSITION_REGISTERD_P(prop) INTEGERP (XCAR (prop))
 
 /* Return ID number of the already registered composition.  */
@@ -92,11 +90,15 @@ extern Lisp_Object composition_temp;
    : (composition_temp = XCDR (XCAR (prop)),                           \
       (NILP (composition_temp)                                         \
        ? COMPOSITION_RELATIVE                                          \
-       : ((INTEGERP (composition_temp) || STRINGP (composition_temp))  \
-         ? COMPOSITION_WITH_ALTCHARS                                   \
-         : COMPOSITION_WITH_RULE_ALTCHARS))))
-
-/* Return 1 iff the composition is valid.  It is valid if length of
+       : (INTEGERP (composition_temp) || STRINGP (composition_temp))   \
+       ? COMPOSITION_WITH_ALTCHARS                                     \
+       : (VECTORP (composition_temp)                                   \
+         && ASIZE (composition_temp) >= 2                              \
+         && VECTORP (AREF (composition_temp, 0)))                      \
+       ? COMPOSITION_WITH_GLYPH_STRING                                 \
+       : COMPOSITION_WITH_RULE_ALTCHARS)))
+
+/* Return 1 if the composition is valid.  It is valid if length of
    the composition equals to (END - START).  */
 #define COMPOSITION_VALID_P(start, end, prop)                  \
   (CONSP (prop)                                                        \
@@ -228,6 +230,9 @@ extern void syms_of_composite P_ ((void));
 extern void compose_text P_ ((int, int, Lisp_Object, Lisp_Object,
                              Lisp_Object));
 
+EXFUN (Fcompose_region_internal, 4);
+EXFUN (Fcompose_string_internal, 5);
+
 #endif /* not EMACS_COMPOSITE_H */
 
 /* arch-tag: 59524d89-c645-47bd-b5e6-65e861690118