]> code.delx.au - gnu-emacs/blobdiff - src/category.c
src/ChangeLog: Fix format.
[gnu-emacs] / src / category.c
index cc7ff88474f9395bb9ff5136490f6ec714fc6157..08eadb047302f40928f36b73e682d0edc216cc6b 100644 (file)
@@ -48,11 +48,16 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    For the moment, we are not using this feature.  */
 static int category_table_version;
 
-Lisp_Object Qcategory_table, Qcategoryp, Qcategorysetp, Qcategory_table_p;
+static Lisp_Object Qcategory_table, Qcategoryp, Qcategorysetp, Qcategory_table_p;
 
 /* Temporary internal variable used in macro CHAR_HAS_CATEGORY.  */
 Lisp_Object _temp_category_set;
 
+/* Make CATEGORY_SET includes (if VAL is t) or excludes (if VAL is
+   nil) CATEGORY.  */
+#define SET_CATEGORY_SET(category_set, category, val) \
+  set_category_set (category_set, category, val)
+static void set_category_set (Lisp_Object, Lisp_Object, Lisp_Object);
 \f
 /* Category set staff.  */
 
@@ -62,8 +67,8 @@ static Lisp_Object
 hash_get_category_set (Lisp_Object table, Lisp_Object category_set)
 {
   struct Lisp_Hash_Table *h;
-  int i;
-  unsigned hash;
+  EMACS_INT i;
+  EMACS_UINT hash;
 
   if (NILP (XCHAR_TABLE (table)->extras[1]))
     XCHAR_TABLE (table)->extras[1]
@@ -111,7 +116,7 @@ those categories.  */)
 \f
 /* Category staff.  */
 
-Lisp_Object check_category_table (Lisp_Object table);
+static Lisp_Object check_category_table (Lisp_Object table);
 
 DEFUN ("define-category", Fdefine_category, Sdefine_category, 2, 3, 0,
        doc: /* Define CATEGORY as a category which is described by DOCSTRING.
@@ -128,7 +133,7 @@ the current buffer's category table.  */)
   table = check_category_table (table);
 
   if (!NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))
-    error ("Category `%c' is already defined", XFASTINT (category));
+    error ("Category `%c' is already defined", (int) XFASTINT (category));
   if (!NILP (Vpurify_flag))
     docstring = Fpurecopy (docstring);
   CATEGORY_DOCSTRING (table, XFASTINT (category)) = docstring;
@@ -185,7 +190,7 @@ DEFUN ("category-table-p", Fcategory_table_p, Scategory_table_p, 1, 1, 0,
    valid, return TABLE itself, but if not valid, signal an error of
    wrong-type-argument.  */
 
-Lisp_Object
+static Lisp_Object
 check_category_table (Lisp_Object table)
 {
   if (NILP (table))
@@ -325,7 +330,7 @@ The return value is a string containing those same categories.  */)
   return build_string (str);
 }
 
-void
+static void
 set_category_set (Lisp_Object category_set, Lisp_Object category, Lisp_Object val)
 {
   do {
@@ -373,7 +378,7 @@ then delete CATEGORY from the category set instead of adding it.  */)
   table = check_category_table (table);
 
   if (NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))
-    error ("Undefined category: %c", XFASTINT (category));
+    error ("Undefined category: %c", (int) XFASTINT (category));
 
   set_value = NILP (reset) ? Qt : Qnil;
 
@@ -448,8 +453,7 @@ void
 init_category_once (void)
 {
   /* This has to be done here, before we call Fmake_char_table.  */
-  Qcategory_table = intern_c_string ("category-table");
-  staticpro (&Qcategory_table);
+  DEFSYM (Qcategory_table, "category-table");
 
   /* Intern this now in case it isn't already done.
      Setting this variable twice is harmless.
@@ -470,12 +474,9 @@ init_category_once (void)
 void
 syms_of_category (void)
 {
-  Qcategoryp = intern_c_string ("categoryp");
-  staticpro (&Qcategoryp);
-  Qcategorysetp = intern_c_string ("categorysetp");
-  staticpro (&Qcategorysetp);
-  Qcategory_table_p = intern_c_string ("category-table-p");
-  staticpro (&Qcategory_table_p);
+  DEFSYM (Qcategoryp, "categoryp");
+  DEFSYM (Qcategorysetp, "categorysetp");
+  DEFSYM (Qcategory_table_p, "category-table-p");
 
   DEFVAR_LISP ("word-combining-categories", Vword_combining_categories,
               doc: /* List of pair (cons) of categories to determine word boundary.