diff options
| author | Paul Eggert | 2012-08-17 10:08:30 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-17 10:08:30 -0700 |
| commit | 34dabdb7701594b83a5b35b034bba55855d256a5 (patch) | |
| tree | 860e8c22685321d157f71cd4a57c9c1162e69d54 /src | |
| parent | c24eb18ab40c3b022ab3b7d9c2aa26a37923340f (diff) | |
| download | emacs-34dabdb7701594b83a5b35b034bba55855d256a5.tar.gz emacs-34dabdb7701594b83a5b35b034bba55855d256a5.zip | |
* lisp.h (set_char_table_extras): Rename from char_table_set_extras.
(set_char_table_contents): Rename from char_table_set_contents.
(set_sub_char_table_contents): Rename from sub_char_table_sub_contents.
All uses changed. See the end of
<http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/casetab.c | 14 | ||||
| -rw-r--r-- | src/category.c | 6 | ||||
| -rw-r--r-- | src/chartab.c | 50 | ||||
| -rw-r--r-- | src/fns.c | 2 | ||||
| -rw-r--r-- | src/fontset.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 10 | ||||
| -rw-r--r-- | src/search.c | 6 |
8 files changed, 49 insertions, 47 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e8b39fca7e6..fb6ffa59e8c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2012-08-17 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2012-08-17 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * lisp.h (set_char_table_extras): Rename from char_table_set_extras. | ||
| 4 | (set_char_table_contents): Rename from char_table_set_contents. | ||
| 5 | (set_sub_char_table_contents): Rename from sub_char_table_sub_contents. | ||
| 6 | All uses changed. See the end of | ||
| 7 | <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>. | ||
| 8 | |||
| 3 | * lisp.h (CSET): Remove (Bug#12215). | 9 | * lisp.h (CSET): Remove (Bug#12215). |
| 4 | (set_char_table_ascii, set_char_table_defalt, set_char_table_parent) | 10 | (set_char_table_ascii, set_char_table_defalt, set_char_table_parent) |
| 5 | (set_char_table_purpose): New functions, | 11 | (set_char_table_purpose): New functions, |
diff --git a/src/casetab.c b/src/casetab.c index 78c6034bf5f..a7dcaada5a2 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -128,13 +128,13 @@ set_case_table (Lisp_Object table, int standard) | |||
| 128 | up = Fmake_char_table (Qcase_table, Qnil); | 128 | up = Fmake_char_table (Qcase_table, Qnil); |
| 129 | map_char_table (set_identity, Qnil, table, up); | 129 | map_char_table (set_identity, Qnil, table, up); |
| 130 | map_char_table (shuffle, Qnil, table, up); | 130 | map_char_table (shuffle, Qnil, table, up); |
| 131 | char_table_set_extras (table, 0, up); | 131 | set_char_table_extras (table, 0, up); |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | if (NILP (canon)) | 134 | if (NILP (canon)) |
| 135 | { | 135 | { |
| 136 | canon = Fmake_char_table (Qcase_table, Qnil); | 136 | canon = Fmake_char_table (Qcase_table, Qnil); |
| 137 | char_table_set_extras (table, 1, canon); | 137 | set_char_table_extras (table, 1, canon); |
| 138 | map_char_table (set_canon, Qnil, table, table); | 138 | map_char_table (set_canon, Qnil, table, table); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| @@ -143,11 +143,11 @@ set_case_table (Lisp_Object table, int standard) | |||
| 143 | eqv = Fmake_char_table (Qcase_table, Qnil); | 143 | eqv = Fmake_char_table (Qcase_table, Qnil); |
| 144 | map_char_table (set_identity, Qnil, canon, eqv); | 144 | map_char_table (set_identity, Qnil, canon, eqv); |
| 145 | map_char_table (shuffle, Qnil, canon, eqv); | 145 | map_char_table (shuffle, Qnil, canon, eqv); |
| 146 | char_table_set_extras (table, 2, eqv); | 146 | set_char_table_extras (table, 2, eqv); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ | 149 | /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ |
| 150 | char_table_set_extras (canon, 2, eqv); | 150 | set_char_table_extras (canon, 2, eqv); |
| 151 | 151 | ||
| 152 | if (standard) | 152 | if (standard) |
| 153 | { | 153 | { |
| @@ -268,10 +268,10 @@ init_casetab_once (void) | |||
| 268 | CHAR_TABLE_SET (down, i, make_number (c)); | 268 | CHAR_TABLE_SET (down, i, make_number (c)); |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | char_table_set_extras (down, 1, Fcopy_sequence (down)); | 271 | set_char_table_extras (down, 1, Fcopy_sequence (down)); |
| 272 | 272 | ||
| 273 | up = Fmake_char_table (Qcase_table, Qnil); | 273 | up = Fmake_char_table (Qcase_table, Qnil); |
| 274 | char_table_set_extras (down, 0, up); | 274 | set_char_table_extras (down, 0, up); |
| 275 | 275 | ||
| 276 | for (i = 0; i < 128; i++) | 276 | for (i = 0; i < 128; i++) |
| 277 | { | 277 | { |
| @@ -281,7 +281,7 @@ init_casetab_once (void) | |||
| 281 | CHAR_TABLE_SET (up, i, make_number (c)); | 281 | CHAR_TABLE_SET (up, i, make_number (c)); |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | char_table_set_extras (down, 2, Fcopy_sequence (up)); | 284 | set_char_table_extras (down, 2, Fcopy_sequence (up)); |
| 285 | 285 | ||
| 286 | /* Fill in what isn't filled in. */ | 286 | /* Fill in what isn't filled in. */ |
| 287 | set_case_table (down, 1); | 287 | set_case_table (down, 1); |
diff --git a/src/category.c b/src/category.c index 8a7d4d40762..ee48ce442e3 100644 --- a/src/category.c +++ b/src/category.c | |||
| @@ -70,7 +70,7 @@ hash_get_category_set (Lisp_Object table, Lisp_Object category_set) | |||
| 70 | EMACS_UINT hash; | 70 | EMACS_UINT hash; |
| 71 | 71 | ||
| 72 | if (NILP (XCHAR_TABLE (table)->extras[1])) | 72 | if (NILP (XCHAR_TABLE (table)->extras[1])) |
| 73 | char_table_set_extras | 73 | set_char_table_extras |
| 74 | (table, 1, | 74 | (table, 1, |
| 75 | make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), | 75 | make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), |
| 76 | make_float (DEFAULT_REHASH_SIZE), | 76 | make_float (DEFAULT_REHASH_SIZE), |
| @@ -240,7 +240,7 @@ copy_category_table (Lisp_Object table) | |||
| 240 | if (! NILP (XCHAR_TABLE (table)->defalt)) | 240 | if (! NILP (XCHAR_TABLE (table)->defalt)) |
| 241 | set_char_table_defalt (table, | 241 | set_char_table_defalt (table, |
| 242 | Fcopy_sequence (XCHAR_TABLE (table)->defalt)); | 242 | Fcopy_sequence (XCHAR_TABLE (table)->defalt)); |
| 243 | char_table_set_extras | 243 | set_char_table_extras |
| 244 | (table, 0, Fcopy_sequence (XCHAR_TABLE (table)->extras[0])); | 244 | (table, 0, Fcopy_sequence (XCHAR_TABLE (table)->extras[0])); |
| 245 | map_char_table (copy_category_entry, Qnil, table, table); | 245 | map_char_table (copy_category_entry, Qnil, table, table); |
| 246 | 246 | ||
| @@ -272,7 +272,7 @@ DEFUN ("make-category-table", Fmake_category_table, Smake_category_table, | |||
| 272 | val = Fmake_char_table (Qcategory_table, Qnil); | 272 | val = Fmake_char_table (Qcategory_table, Qnil); |
| 273 | set_char_table_defalt (val, MAKE_CATEGORY_SET); | 273 | set_char_table_defalt (val, MAKE_CATEGORY_SET); |
| 274 | for (i = 0; i < (1 << CHARTAB_SIZE_BITS_0); i++) | 274 | for (i = 0; i < (1 << CHARTAB_SIZE_BITS_0); i++) |
| 275 | char_table_set_contents (val, i, MAKE_CATEGORY_SET); | 275 | set_char_table_contents (val, i, MAKE_CATEGORY_SET); |
| 276 | Fset_char_table_extra_slot (val, make_number (0), | 276 | Fset_char_table_extra_slot (val, make_number (0), |
| 277 | Fmake_vector (make_number (95), Qnil)); | 277 | Fmake_vector (make_number (95), Qnil)); |
| 278 | return val; | 278 | return val; |
diff --git a/src/chartab.c b/src/chartab.c index 01b65eb50b7..25d331b73e2 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -155,21 +155,17 @@ char_table_ascii (Lisp_Object table) | |||
| 155 | static Lisp_Object | 155 | static Lisp_Object |
| 156 | copy_sub_char_table (Lisp_Object table) | 156 | copy_sub_char_table (Lisp_Object table) |
| 157 | { | 157 | { |
| 158 | Lisp_Object copy; | ||
| 159 | int depth = XINT (XSUB_CHAR_TABLE (table)->depth); | 158 | int depth = XINT (XSUB_CHAR_TABLE (table)->depth); |
| 160 | int min_char = XINT (XSUB_CHAR_TABLE (table)->min_char); | 159 | int min_char = XINT (XSUB_CHAR_TABLE (table)->min_char); |
| 161 | Lisp_Object val; | 160 | Lisp_Object copy = make_sub_char_table (depth, min_char, Qnil); |
| 162 | int i; | 161 | int i; |
| 163 | 162 | ||
| 164 | copy = make_sub_char_table (depth, min_char, Qnil); | ||
| 165 | /* Recursively copy any sub char-tables. */ | 163 | /* Recursively copy any sub char-tables. */ |
| 166 | for (i = 0; i < chartab_size[depth]; i++) | 164 | for (i = 0; i < chartab_size[depth]; i++) |
| 167 | { | 165 | { |
| 168 | val = XSUB_CHAR_TABLE (table)->contents[i]; | 166 | Lisp_Object val = XSUB_CHAR_TABLE (table)->contents[i]; |
| 169 | if (SUB_CHAR_TABLE_P (val)) | 167 | set_sub_char_table_contents |
| 170 | sub_char_table_set_contents (copy, i, copy_sub_char_table (val)); | 168 | (copy, i, SUB_CHAR_TABLE_P (val) ? copy_sub_char_table (val) : val); |
| 171 | else | ||
| 172 | sub_char_table_set_contents (copy, i, val); | ||
| 173 | } | 169 | } |
| 174 | 170 | ||
| 175 | return copy; | 171 | return copy; |
| @@ -189,7 +185,7 @@ copy_char_table (Lisp_Object table) | |||
| 189 | set_char_table_parent (copy, XCHAR_TABLE (table)->parent); | 185 | set_char_table_parent (copy, XCHAR_TABLE (table)->parent); |
| 190 | set_char_table_purpose (copy, XCHAR_TABLE (table)->purpose); | 186 | set_char_table_purpose (copy, XCHAR_TABLE (table)->purpose); |
| 191 | for (i = 0; i < chartab_size[0]; i++) | 187 | for (i = 0; i < chartab_size[0]; i++) |
| 192 | char_table_set_contents | 188 | set_char_table_contents |
| 193 | (copy, i, | 189 | (copy, i, |
| 194 | (SUB_CHAR_TABLE_P (XCHAR_TABLE (table)->contents[i]) | 190 | (SUB_CHAR_TABLE_P (XCHAR_TABLE (table)->contents[i]) |
| 195 | ? copy_sub_char_table (XCHAR_TABLE (table)->contents[i]) | 191 | ? copy_sub_char_table (XCHAR_TABLE (table)->contents[i]) |
| @@ -197,7 +193,7 @@ copy_char_table (Lisp_Object table) | |||
| 197 | set_char_table_ascii (copy, char_table_ascii (copy)); | 193 | set_char_table_ascii (copy, char_table_ascii (copy)); |
| 198 | size -= VECSIZE (struct Lisp_Char_Table) - 1; | 194 | size -= VECSIZE (struct Lisp_Char_Table) - 1; |
| 199 | for (i = 0; i < size; i++) | 195 | for (i = 0; i < size; i++) |
| 200 | char_table_set_extras (copy, i, XCHAR_TABLE (table)->extras[i]); | 196 | set_char_table_extras (copy, i, XCHAR_TABLE (table)->extras[i]); |
| 201 | 197 | ||
| 202 | XSETCHAR_TABLE (copy, XCHAR_TABLE (copy)); | 198 | XSETCHAR_TABLE (copy, XCHAR_TABLE (copy)); |
| 203 | return copy; | 199 | return copy; |
| @@ -395,7 +391,7 @@ sub_char_table_set (Lisp_Object table, int c, Lisp_Object val, int is_uniprop) | |||
| 395 | Lisp_Object sub; | 391 | Lisp_Object sub; |
| 396 | 392 | ||
| 397 | if (depth == 3) | 393 | if (depth == 3) |
| 398 | sub_char_table_set_contents (table, i, val); | 394 | set_sub_char_table_contents (table, i, val); |
| 399 | else | 395 | else |
| 400 | { | 396 | { |
| 401 | sub = tbl->contents[i]; | 397 | sub = tbl->contents[i]; |
| @@ -408,7 +404,7 @@ sub_char_table_set (Lisp_Object table, int c, Lisp_Object val, int is_uniprop) | |||
| 408 | sub = make_sub_char_table (depth + 1, | 404 | sub = make_sub_char_table (depth + 1, |
| 409 | min_char + i * chartab_chars[depth], | 405 | min_char + i * chartab_chars[depth], |
| 410 | sub); | 406 | sub); |
| 411 | sub_char_table_set_contents (table, i, sub); | 407 | set_sub_char_table_contents (table, i, sub); |
| 412 | } | 408 | } |
| 413 | } | 409 | } |
| 414 | sub_char_table_set (sub, c, val, is_uniprop); | 410 | sub_char_table_set (sub, c, val, is_uniprop); |
| @@ -422,7 +418,7 @@ char_table_set (Lisp_Object table, int c, Lisp_Object val) | |||
| 422 | 418 | ||
| 423 | if (ASCII_CHAR_P (c) | 419 | if (ASCII_CHAR_P (c) |
| 424 | && SUB_CHAR_TABLE_P (tbl->ascii)) | 420 | && SUB_CHAR_TABLE_P (tbl->ascii)) |
| 425 | sub_char_table_set_contents (tbl->ascii, c, val); | 421 | set_sub_char_table_contents (tbl->ascii, c, val); |
| 426 | else | 422 | else |
| 427 | { | 423 | { |
| 428 | int i = CHARTAB_IDX (c, 0, 0); | 424 | int i = CHARTAB_IDX (c, 0, 0); |
| @@ -432,7 +428,7 @@ char_table_set (Lisp_Object table, int c, Lisp_Object val) | |||
| 432 | if (! SUB_CHAR_TABLE_P (sub)) | 428 | if (! SUB_CHAR_TABLE_P (sub)) |
| 433 | { | 429 | { |
| 434 | sub = make_sub_char_table (1, i * chartab_chars[0], sub); | 430 | sub = make_sub_char_table (1, i * chartab_chars[0], sub); |
| 435 | char_table_set_contents (table, i, sub); | 431 | set_char_table_contents (table, i, sub); |
| 436 | } | 432 | } |
| 437 | sub_char_table_set (sub, c, val, UNIPROP_TABLE_P (table)); | 433 | sub_char_table_set (sub, c, val, UNIPROP_TABLE_P (table)); |
| 438 | if (ASCII_CHAR_P (c)) | 434 | if (ASCII_CHAR_P (c)) |
| @@ -460,7 +456,7 @@ sub_char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val, | |||
| 460 | if (c > to) | 456 | if (c > to) |
| 461 | break; | 457 | break; |
| 462 | if (from <= c && c + chars_in_block - 1 <= to) | 458 | if (from <= c && c + chars_in_block - 1 <= to) |
| 463 | sub_char_table_set_contents (table, i, val); | 459 | set_sub_char_table_contents (table, i, val); |
| 464 | else | 460 | else |
| 465 | { | 461 | { |
| 466 | Lisp_Object sub = tbl->contents[i]; | 462 | Lisp_Object sub = tbl->contents[i]; |
| @@ -471,7 +467,7 @@ sub_char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val, | |||
| 471 | else | 467 | else |
| 472 | { | 468 | { |
| 473 | sub = make_sub_char_table (depth + 1, c, sub); | 469 | sub = make_sub_char_table (depth + 1, c, sub); |
| 474 | sub_char_table_set_contents (table, i, sub); | 470 | set_sub_char_table_contents (table, i, sub); |
| 475 | } | 471 | } |
| 476 | } | 472 | } |
| 477 | sub_char_table_set_range (sub, from, to, val, is_uniprop); | 473 | sub_char_table_set_range (sub, from, to, val, is_uniprop); |
| @@ -499,14 +495,14 @@ char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val) | |||
| 499 | if (c > to) | 495 | if (c > to) |
| 500 | break; | 496 | break; |
| 501 | if (from <= c && c + chartab_chars[0] - 1 <= to) | 497 | if (from <= c && c + chartab_chars[0] - 1 <= to) |
| 502 | char_table_set_contents (table, i, val); | 498 | set_char_table_contents (table, i, val); |
| 503 | else | 499 | else |
| 504 | { | 500 | { |
| 505 | Lisp_Object sub = tbl->contents[i]; | 501 | Lisp_Object sub = tbl->contents[i]; |
| 506 | if (! SUB_CHAR_TABLE_P (sub)) | 502 | if (! SUB_CHAR_TABLE_P (sub)) |
| 507 | { | 503 | { |
| 508 | sub = make_sub_char_table (1, i * chartab_chars[0], sub); | 504 | sub = make_sub_char_table (1, i * chartab_chars[0], sub); |
| 509 | char_table_set_contents (table, i, sub); | 505 | set_char_table_contents (table, i, sub); |
| 510 | } | 506 | } |
| 511 | sub_char_table_set_range (sub, from, to, val, is_uniprop); | 507 | sub_char_table_set_range (sub, from, to, val, is_uniprop); |
| 512 | } | 508 | } |
| @@ -593,7 +589,7 @@ DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, | |||
| 593 | || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) | 589 | || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) |
| 594 | args_out_of_range (char_table, n); | 590 | args_out_of_range (char_table, n); |
| 595 | 591 | ||
| 596 | char_table_set_extras (char_table, XINT (n), value); | 592 | set_char_table_extras (char_table, XINT (n), value); |
| 597 | return value; | 593 | return value; |
| 598 | } | 594 | } |
| 599 | 595 | ||
| @@ -642,7 +638,7 @@ or a character code. Return VALUE. */) | |||
| 642 | 638 | ||
| 643 | set_char_table_ascii (char_table, value); | 639 | set_char_table_ascii (char_table, value); |
| 644 | for (i = 0; i < chartab_size[0]; i++) | 640 | for (i = 0; i < chartab_size[0]; i++) |
| 645 | char_table_set_contents (char_table, i, value); | 641 | set_char_table_contents (char_table, i, value); |
| 646 | } | 642 | } |
| 647 | else if (EQ (range, Qnil)) | 643 | else if (EQ (range, Qnil)) |
| 648 | set_char_table_defalt (char_table, value); | 644 | set_char_table_defalt (char_table, value); |
| @@ -695,7 +691,7 @@ optimize_sub_char_table (Lisp_Object table, Lisp_Object test) | |||
| 695 | if (SUB_CHAR_TABLE_P (elt)) | 691 | if (SUB_CHAR_TABLE_P (elt)) |
| 696 | { | 692 | { |
| 697 | elt = optimize_sub_char_table (elt, test); | 693 | elt = optimize_sub_char_table (elt, test); |
| 698 | sub_char_table_set_contents (table, 0, elt); | 694 | set_sub_char_table_contents (table, 0, elt); |
| 699 | } | 695 | } |
| 700 | optimizable = SUB_CHAR_TABLE_P (elt) ? 0 : 1; | 696 | optimizable = SUB_CHAR_TABLE_P (elt) ? 0 : 1; |
| 701 | for (i = 1; i < chartab_size[depth]; i++) | 697 | for (i = 1; i < chartab_size[depth]; i++) |
| @@ -704,7 +700,7 @@ optimize_sub_char_table (Lisp_Object table, Lisp_Object test) | |||
| 704 | if (SUB_CHAR_TABLE_P (this)) | 700 | if (SUB_CHAR_TABLE_P (this)) |
| 705 | { | 701 | { |
| 706 | this = optimize_sub_char_table (this, test); | 702 | this = optimize_sub_char_table (this, test); |
| 707 | sub_char_table_set_contents (table, i, this); | 703 | set_sub_char_table_contents (table, i, this); |
| 708 | } | 704 | } |
| 709 | if (optimizable | 705 | if (optimizable |
| 710 | && (NILP (test) ? NILP (Fequal (this, elt)) /* defaults to `equal'. */ | 706 | && (NILP (test) ? NILP (Fequal (this, elt)) /* defaults to `equal'. */ |
| @@ -732,7 +728,7 @@ equivalent and can be merged. It defaults to `equal'. */) | |||
| 732 | { | 728 | { |
| 733 | elt = XCHAR_TABLE (char_table)->contents[i]; | 729 | elt = XCHAR_TABLE (char_table)->contents[i]; |
| 734 | if (SUB_CHAR_TABLE_P (elt)) | 730 | if (SUB_CHAR_TABLE_P (elt)) |
| 735 | char_table_set_contents | 731 | set_char_table_contents |
| 736 | (char_table, i, optimize_sub_char_table (elt, test)); | 732 | (char_table, i, optimize_sub_char_table (elt, test)); |
| 737 | } | 733 | } |
| 738 | /* Reset the `ascii' cache, in case it got optimized away. */ | 734 | /* Reset the `ascii' cache, in case it got optimized away. */ |
| @@ -1149,7 +1145,7 @@ uniprop_table_uncompress (Lisp_Object table, int idx) | |||
| 1149 | Lisp_Object sub = make_sub_char_table (3, min_char, Qnil); | 1145 | Lisp_Object sub = make_sub_char_table (3, min_char, Qnil); |
| 1150 | const unsigned char *p, *pend; | 1146 | const unsigned char *p, *pend; |
| 1151 | 1147 | ||
| 1152 | sub_char_table_set_contents (table, idx, sub); | 1148 | set_sub_char_table_contents (table, idx, sub); |
| 1153 | p = SDATA (val), pend = p + SBYTES (val); | 1149 | p = SDATA (val), pend = p + SBYTES (val); |
| 1154 | if (*p == 1) | 1150 | if (*p == 1) |
| 1155 | { | 1151 | { |
| @@ -1159,7 +1155,7 @@ uniprop_table_uncompress (Lisp_Object table, int idx) | |||
| 1159 | while (p < pend && idx < chartab_chars[2]) | 1155 | while (p < pend && idx < chartab_chars[2]) |
| 1160 | { | 1156 | { |
| 1161 | int v = STRING_CHAR_ADVANCE (p); | 1157 | int v = STRING_CHAR_ADVANCE (p); |
| 1162 | sub_char_table_set_contents | 1158 | set_sub_char_table_contents |
| 1163 | (sub, idx++, v > 0 ? make_number (v) : Qnil); | 1159 | (sub, idx++, v > 0 ? make_number (v) : Qnil); |
| 1164 | } | 1160 | } |
| 1165 | } | 1161 | } |
| @@ -1185,7 +1181,7 @@ uniprop_table_uncompress (Lisp_Object table, int idx) | |||
| 1185 | } | 1181 | } |
| 1186 | } | 1182 | } |
| 1187 | while (count-- > 0) | 1183 | while (count-- > 0) |
| 1188 | sub_char_table_set_contents (sub, idx++, make_number (v)); | 1184 | set_sub_char_table_contents (sub, idx++, make_number (v)); |
| 1189 | } | 1185 | } |
| 1190 | } | 1186 | } |
| 1191 | /* It seems that we don't need this function because C code won't need | 1187 | /* It seems that we don't need this function because C code won't need |
| @@ -1288,7 +1284,7 @@ uniprop_encode_value_numeric (Lisp_Object table, Lisp_Object value) | |||
| 1288 | 1284 | ||
| 1289 | args[0] = XCHAR_TABLE (table)->extras[4]; | 1285 | args[0] = XCHAR_TABLE (table)->extras[4]; |
| 1290 | args[1] = Fmake_vector (make_number (1), value); | 1286 | args[1] = Fmake_vector (make_number (1), value); |
| 1291 | char_table_set_extras (table, 4, Fvconcat (2, args)); | 1287 | set_char_table_extras (table, 4, Fvconcat (2, args)); |
| 1292 | } | 1288 | } |
| 1293 | return make_number (i); | 1289 | return make_number (i); |
| 1294 | } | 1290 | } |
| @@ -2150,7 +2150,7 @@ ARRAY is a vector, string, char-table, or bool-vector. */) | |||
| 2150 | int i; | 2150 | int i; |
| 2151 | 2151 | ||
| 2152 | for (i = 0; i < (1 << CHARTAB_SIZE_BITS_0); i++) | 2152 | for (i = 0; i < (1 << CHARTAB_SIZE_BITS_0); i++) |
| 2153 | char_table_set_contents (array, i, item); | 2153 | set_char_table_contents (array, i, item); |
| 2154 | set_char_table_defalt (array, item); | 2154 | set_char_table_defalt (array, item); |
| 2155 | } | 2155 | } |
| 2156 | else if (STRINGP (array)) | 2156 | else if (STRINGP (array)) |
diff --git a/src/fontset.c b/src/fontset.c index b25a896deda..c39d68a8ecf 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1916,7 +1916,7 @@ format is the same as above. */) | |||
| 1916 | if (!EQ (fontset, Vdefault_fontset)) | 1916 | if (!EQ (fontset, Vdefault_fontset)) |
| 1917 | { | 1917 | { |
| 1918 | tables[1] = Fmake_char_table (Qnil, Qnil); | 1918 | tables[1] = Fmake_char_table (Qnil, Qnil); |
| 1919 | char_table_set_extras (tables[0], 0, tables[1]); | 1919 | set_char_table_extras (tables[0], 0, tables[1]); |
| 1920 | fontsets[1] = Vdefault_fontset; | 1920 | fontsets[1] = Vdefault_fontset; |
| 1921 | } | 1921 | } |
| 1922 | 1922 | ||
diff --git a/src/lisp.h b/src/lisp.h index 6da1fe97c12..44a757f19c7 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -923,7 +923,7 @@ enum | |||
| 923 | 8-bit European characters. Do not check validity of CT. */ | 923 | 8-bit European characters. Do not check validity of CT. */ |
| 924 | #define CHAR_TABLE_SET(CT, IDX, VAL) \ | 924 | #define CHAR_TABLE_SET(CT, IDX, VAL) \ |
| 925 | (ASCII_CHAR_P (IDX) && SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii) \ | 925 | (ASCII_CHAR_P (IDX) && SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii) \ |
| 926 | ? sub_char_table_set_contents (XCHAR_TABLE (CT)->ascii, IDX, VAL) \ | 926 | ? set_sub_char_table_contents (XCHAR_TABLE (CT)->ascii, IDX, VAL) \ |
| 927 | : char_table_set (CT, IDX, VAL)) | 927 | : char_table_set (CT, IDX, VAL)) |
| 928 | 928 | ||
| 929 | enum CHARTAB_SIZE_BITS | 929 | enum CHARTAB_SIZE_BITS |
| @@ -984,7 +984,7 @@ struct Lisp_Sub_Char_Table | |||
| 984 | /* Minimum character covered by the sub char-table. */ | 984 | /* Minimum character covered by the sub char-table. */ |
| 985 | Lisp_Object min_char; | 985 | Lisp_Object min_char; |
| 986 | 986 | ||
| 987 | /* Use sub_char_table_set_contents to set this. */ | 987 | /* Use set_sub_char_table_contents to set this. */ |
| 988 | Lisp_Object contents[1]; | 988 | Lisp_Object contents[1]; |
| 989 | }; | 989 | }; |
| 990 | 990 | ||
| @@ -2498,21 +2498,21 @@ set_char_table_purpose (Lisp_Object table, Lisp_Object val) | |||
| 2498 | /* Set different slots in (sub)character tables. */ | 2498 | /* Set different slots in (sub)character tables. */ |
| 2499 | 2499 | ||
| 2500 | LISP_INLINE void | 2500 | LISP_INLINE void |
| 2501 | char_table_set_extras (Lisp_Object table, ptrdiff_t idx, Lisp_Object val) | 2501 | set_char_table_extras (Lisp_Object table, ptrdiff_t idx, Lisp_Object val) |
| 2502 | { | 2502 | { |
| 2503 | eassert (0 <= idx && idx < CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (table))); | 2503 | eassert (0 <= idx && idx < CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (table))); |
| 2504 | XCHAR_TABLE (table)->extras[idx] = val; | 2504 | XCHAR_TABLE (table)->extras[idx] = val; |
| 2505 | } | 2505 | } |
| 2506 | 2506 | ||
| 2507 | LISP_INLINE void | 2507 | LISP_INLINE void |
| 2508 | char_table_set_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val) | 2508 | set_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val) |
| 2509 | { | 2509 | { |
| 2510 | eassert (0 <= idx && idx < (1 << CHARTAB_SIZE_BITS_0)); | 2510 | eassert (0 <= idx && idx < (1 << CHARTAB_SIZE_BITS_0)); |
| 2511 | XCHAR_TABLE (table)->contents[idx] = val; | 2511 | XCHAR_TABLE (table)->contents[idx] = val; |
| 2512 | } | 2512 | } |
| 2513 | 2513 | ||
| 2514 | LISP_INLINE void | 2514 | LISP_INLINE void |
| 2515 | sub_char_table_set_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val) | 2515 | set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val) |
| 2516 | { | 2516 | { |
| 2517 | XSUB_CHAR_TABLE (table)->contents[idx] = val; | 2517 | XSUB_CHAR_TABLE (table)->contents[idx] = val; |
| 2518 | } | 2518 | } |
diff --git a/src/search.c b/src/search.c index 4bf4d11c33a..0b4f635066c 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -278,7 +278,7 @@ looking_at_1 (Lisp_Object string, int posix) | |||
| 278 | save_search_regs (); | 278 | save_search_regs (); |
| 279 | 279 | ||
| 280 | /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ | 280 | /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ |
| 281 | char_table_set_extras (BVAR (current_buffer, case_canon_table), 2, | 281 | set_char_table_extras (BVAR (current_buffer, case_canon_table), 2, |
| 282 | BVAR (current_buffer, case_eqv_table)); | 282 | BVAR (current_buffer, case_eqv_table)); |
| 283 | 283 | ||
| 284 | CHECK_STRING (string); | 284 | CHECK_STRING (string); |
| @@ -393,7 +393,7 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int p | |||
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ | 395 | /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ |
| 396 | char_table_set_extras (BVAR (current_buffer, case_canon_table), 2, | 396 | set_char_table_extras (BVAR (current_buffer, case_canon_table), 2, |
| 397 | BVAR (current_buffer, case_eqv_table)); | 397 | BVAR (current_buffer, case_eqv_table)); |
| 398 | 398 | ||
| 399 | bufp = compile_pattern (regexp, | 399 | bufp = compile_pattern (regexp, |
| @@ -990,7 +990,7 @@ search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, | |||
| 990 | } | 990 | } |
| 991 | 991 | ||
| 992 | /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ | 992 | /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ |
| 993 | char_table_set_extras (BVAR (current_buffer, case_canon_table), 2, | 993 | set_char_table_extras (BVAR (current_buffer, case_canon_table), 2, |
| 994 | BVAR (current_buffer, case_eqv_table)); | 994 | BVAR (current_buffer, case_eqv_table)); |
| 995 | 995 | ||
| 996 | np = search_buffer (string, PT, PT_BYTE, lim, lim_byte, n, RE, | 996 | np = search_buffer (string, PT, PT_BYTE, lim, lim_byte, n, RE, |