/[emacs]/emacs/src/category.c
ViewVC logotype

Diff of /emacs/src/category.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30 by monnier, Wed Nov 28 20:44:42 2001 UTC revision 1.30.4.1 by miles, Fri Apr 4 06:20:57 2003 UTC
# Line 69  those categories.  */) Line 69  those categories.  */)
69    if (STRING_MULTIBYTE (categories))    if (STRING_MULTIBYTE (categories))
70      error ("Multibyte string in make-category-set");      error ("Multibyte string in make-category-set");
71    
72    len = XSTRING (categories)->size;    len = SCHARS (categories);
73    while (--len >= 0)    while (--len >= 0)
74      {      {
75        Lisp_Object category;        Lisp_Object category;
76    
77        XSETFASTINT (category, XSTRING (categories)->data[len]);        XSETFASTINT (category, SREF (categories, len));
78        CHECK_CATEGORY (category);        CHECK_CATEGORY (category);
79        SET_CATEGORY_SET (val, category, Qt);        SET_CATEGORY_SET (val, category, Qt);
80      }      }
# Line 167  check_category_table (table) Line 167  check_category_table (table)
167    while (tem = Fcategory_table_p (table), NILP (tem))    while (tem = Fcategory_table_p (table), NILP (tem))
168      table = wrong_type_argument (Qcategory_table_p, table);      table = wrong_type_argument (Qcategory_table_p, table);
169    return table;    return table;
170  }    }
171    
172  DEFUN ("category-table", Fcategory_table, Scategory_table, 0, 0, 0,  DEFUN ("category-table", Fcategory_table, Scategory_table, 0, 0, 0,
173         doc: /* Return the current category table.         doc: /* Return the current category table.
# Line 377  then delete CATEGORY from the category s Line 377  then delete CATEGORY from the category s
377    
378    if (NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))    if (NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))
379      error ("Undefined category: %c", XFASTINT (category));      error ("Undefined category: %c", XFASTINT (category));
380      
381    set_value = NILP (reset) ? Qt : Qnil;    set_value = NILP (reset) ? Qt : Qnil;
382    
383    if (c < CHAR_TABLE_SINGLE_BYTE_SLOTS)    if (c < CHAR_TABLE_SINGLE_BYTE_SLOTS)
# Line 534  init_category_once () Line 534  init_category_once ()
534    Fput (Qcategory_table, Qchar_table_extra_slots, make_number (2));    Fput (Qcategory_table, Qchar_table_extra_slots, make_number (2));
535    
536    Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil);    Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil);
537    /* Set a category set which contains nothing to the default.  */    /* Set a category set which contains nothing to the default.  */
538    XCHAR_TABLE (Vstandard_category_table)->defalt = MAKE_CATEGORY_SET;    XCHAR_TABLE (Vstandard_category_table)->defalt = MAKE_CATEGORY_SET;
539    Fset_char_table_extra_slot (Vstandard_category_table, make_number (0),    Fset_char_table_extra_slot (Vstandard_category_table, make_number (0),
540                                Fmake_vector (make_number (95), Qnil));                                Fmake_vector (make_number (95), Qnil));

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.30.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26