aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1997-03-18 23:31:34 +0000
committerKenichi Handa1997-03-18 23:31:34 +0000
commitcecda31486b7ab7219a51d37b2fee0afc9ff31ee (patch)
tree2a56a7b30b5316a0808b0a0f7480383f61a68251
parent513ee44261593360bdfa5e83ff46ba5d41873a47 (diff)
downloademacs-cecda31486b7ab7219a51d37b2fee0afc9ff31ee.tar.gz
emacs-cecda31486b7ab7219a51d37b2fee0afc9ff31ee.zip
Adjusted for the change of CHAR_TABLE_ORDINARY_SLOTS.
-rw-r--r--src/category.c8
-rw-r--r--src/category.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/category.c b/src/category.c
index 1b1c1878c93..58d5f41a617 100644
--- a/src/category.c
+++ b/src/category.c
@@ -352,7 +352,7 @@ If optional forth argument RESET is non NIL,\n\
352 352
353 set_value = NILP (reset) ? Qt : Qnil; 353 set_value = NILP (reset) ? Qt : Qnil;
354 354
355 if (SINGLE_BYTE_CHAR_P (c)) 355 if ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS)
356 { 356 {
357 val = XCHAR_TABLE (table)->contents[c]; 357 val = XCHAR_TABLE (table)->contents[c];
358 if (!CATEGORY_SET_P (val)) 358 if (!CATEGORY_SET_P (val))
@@ -366,11 +366,11 @@ If optional forth argument RESET is non NIL,\n\
366 SPLIT_NON_ASCII_CHAR (c, charset, c1, c2); 366 SPLIT_NON_ASCII_CHAR (c, charset, c1, c2);
367 367
368 /* The top level table. */ 368 /* The top level table. */
369 val = XCHAR_TABLE (table)->contents[charset]; 369 val = XCHAR_TABLE (table)->contents[charset + 128];
370 if (NILP (val)) 370 if (NILP (val))
371 { 371 {
372 category_set = MAKE_CATEGORY_SET; 372 category_set = MAKE_CATEGORY_SET;
373 XCHAR_TABLE (table)->contents[charset] = category_set; 373 XCHAR_TABLE (table)->contents[charset + 128] = category_set;
374 } 374 }
375 else if (CATEGORY_SET_P (val)) 375 else if (CATEGORY_SET_P (val))
376 category_set = val; 376 category_set = val;
@@ -390,7 +390,7 @@ If optional forth argument RESET is non NIL,\n\
390 if (!CHAR_TABLE_P (val)) 390 if (!CHAR_TABLE_P (val))
391 { 391 {
392 val = Fmake_char_table (Qnil, Qnil); 392 val = Fmake_char_table (Qnil, Qnil);
393 XCHAR_TABLE (table)->contents[charset] = val; 393 XCHAR_TABLE (table)->contents[charset + 128] = val;
394 /* We must set default category set of CHARSET in `defalt' slot. */ 394 /* We must set default category set of CHARSET in `defalt' slot. */
395 XCHAR_TABLE (val)->defalt = category_set; 395 XCHAR_TABLE (val)->defalt = category_set;
396 } 396 }
diff --git a/src/category.h b/src/category.h
index b51cb4d1d5a..f475928b0a4 100644
--- a/src/category.h
+++ b/src/category.h
@@ -37,12 +37,12 @@ Boston, MA 02111-1307, USA. */
37 categories. Total number of categories is limited to 95. 37 categories. Total number of categories is limited to 95.
38 38
39 A category set is a set of categories represented by Lisp 39 A category set is a set of categories represented by Lisp
40 bool-vector of length 128 (only elements of 31th through 125th 40 bool-vector of length 128 (only elements of 31th through 126th
41 are used). 41 are used).
42 42
43 A category table is like syntax-table, represented by a Lisp 43 A category table is like syntax-table, represented by a Lisp
44 char-table. The contents are category sets or nil. It has two 44 char-table. The contents are category sets or nil. It has two
45 extra slots. for a vector of doc string of each category and a 45 extra slots, for a vector of doc string of each category and a
46 version number. 46 version number.
47 47
48 The first extra slot is a vector of doc strings of categories, the 48 The first extra slot is a vector of doc strings of categories, the
@@ -101,7 +101,7 @@ extern Lisp_Object _temp_category_set;
101#define CATEGORY_SET(c) \ 101#define CATEGORY_SET(c) \
102 ({ Lisp_Object table = current_buffer->category_table; \ 102 ({ Lisp_Object table = current_buffer->category_table; \
103 Lisp_Object temp; \ 103 Lisp_Object temp; \
104 if ((c) < CHAR_TABLE_ORDINARY_SLOTS) \ 104 if ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS) \
105 while (NILP (temp = XCHAR_TABLE (table)->contents[(unsigned char) c]) \ 105 while (NILP (temp = XCHAR_TABLE (table)->contents[(unsigned char) c]) \
106 && NILP (temp = XCHAR_TABLE (table)->defalt)) \ 106 && NILP (temp = XCHAR_TABLE (table)->defalt)) \
107 table = XCHAR_TABLE (table)->parent; \ 107 table = XCHAR_TABLE (table)->parent; \
@@ -111,7 +111,7 @@ extern Lisp_Object _temp_category_set;
111 temp; }) 111 temp; })
112#else 112#else
113#define CATEGORY_SET(c) \ 113#define CATEGORY_SET(c) \
114 ((c) < CHAR_TABLE_ORDINARY_SLOTS \ 114 ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS \
115 ? Faref (current_buffer->category_table, make_number ((unsigned char) c)) \ 115 ? Faref (current_buffer->category_table, make_number ((unsigned char) c)) \
116 : Faref (current_buffer->category_table, \ 116 : Faref (current_buffer->category_table, \
117 COMPOSITE_CHAR_P (c) ? cmpchar_component ((c), 0) : (c)) 117 COMPOSITE_CHAR_P (c) ? cmpchar_component ((c), 0) : (c))