Mercurial > emacs
comparison src/lisp.h @ 13202:b307cd5c259f
(struct Lisp_Char_Table): New slot `purpose'.
(CHAR_TABLE_STANDARD_SLOTS): Add one.
(CHECK_VECTOR_OR_CHAR_TABLE): New macro.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 12 Oct 1995 21:19:49 +0000 |
parents | b1dcc3e87ffb |
children | b1d118fb7b3e |
comparison
equal
deleted
inserted
replaced
13201:e9007fec678e | 13202:b307cd5c259f |
---|---|
549 or character sets. */ | 549 or character sets. */ |
550 #define CHAR_TABLE_ORDINARY_SLOTS 256 | 550 #define CHAR_TABLE_ORDINARY_SLOTS 256 |
551 | 551 |
552 /* This is the number of slots that every char table must have. | 552 /* This is the number of slots that every char table must have. |
553 This counts the ordinary slots and the parent and defalt slots. */ | 553 This counts the ordinary slots and the parent and defalt slots. */ |
554 #define CHAR_TABLE_STANDARD_SLOTS (256+2) | 554 #define CHAR_TABLE_STANDARD_SLOTS (256+3) |
555 | 555 |
556 /* Return the number of "extra" slots in the char table CT. */ | 556 /* Return the number of "extra" slots in the char table CT. */ |
557 | 557 |
558 #define CHAR_TABLE_EXTRA_SLOTS(CT) \ | 558 #define CHAR_TABLE_EXTRA_SLOTS(CT) \ |
559 (((CT)->size & PSEUDOVECTOR_SIZE_MASK) - CHAR_TABLE_STANDARD_SLOTS) | 559 (((CT)->size & PSEUDOVECTOR_SIZE_MASK) - CHAR_TABLE_STANDARD_SLOTS) |
571 Lisp_Object defalt; | 571 Lisp_Object defalt; |
572 /* This points to another char table, which we inherit from | 572 /* This points to another char table, which we inherit from |
573 when the value for a specific character is nil. | 573 when the value for a specific character is nil. |
574 The `defalt' slot takes precedence over this. */ | 574 The `defalt' slot takes precedence over this. */ |
575 Lisp_Object parent; | 575 Lisp_Object parent; |
576 /* This should be a symbol which says what kind of use | |
577 this char-table is meant for. | |
578 Typically now the values can be `syntax-table' and `display-table'. */ | |
579 Lisp_Object purpose; | |
576 /* These hold additional data. */ | 580 /* These hold additional data. */ |
577 Lisp_Object extras[1]; | 581 Lisp_Object extras[1]; |
578 }; | 582 }; |
579 | 583 |
580 /* A boolvector is a kind of vectorlike, with contents are like a string. */ | 584 /* A boolvector is a kind of vectorlike, with contents are like a string. */ |
991 do { if (!CHAR_TABLE_P ((x)) && !NILP (x)) \ | 995 do { if (!CHAR_TABLE_P ((x)) && !NILP (x)) \ |
992 x = wrong_type_argument (Qchar_table_p, (x)); } while (0) | 996 x = wrong_type_argument (Qchar_table_p, (x)); } while (0) |
993 | 997 |
994 #define CHECK_VECTOR(x, i) \ | 998 #define CHECK_VECTOR(x, i) \ |
995 do { if (!VECTORP ((x))) x = wrong_type_argument (Qvectorp, (x)); } while (0) | 999 do { if (!VECTORP ((x))) x = wrong_type_argument (Qvectorp, (x)); } while (0) |
1000 | |
1001 #define CHECK_VECTOR_OR_CHAR_TABLE(x, i) \ | |
1002 do { if (!VECTORP ((x)) && !CHAR_TABLE_P ((x))) \ | |
1003 x = wrong_type_argument (Qvector_or_char_table_p, (x)); \ | |
1004 } while (0) | |
996 | 1005 |
997 #define CHECK_BUFFER(x, i) \ | 1006 #define CHECK_BUFFER(x, i) \ |
998 do { if (!BUFFERP ((x))) x = wrong_type_argument (Qbufferp, (x)); } while (0) | 1007 do { if (!BUFFERP ((x))) x = wrong_type_argument (Qbufferp, (x)); } while (0) |
999 | 1008 |
1000 #define CHECK_WINDOW(x, i) \ | 1009 #define CHECK_WINDOW(x, i) \ |
1349 extern Lisp_Object Qintegerp, Qnumberp, Qnatnump, Qwholenump; | 1358 extern Lisp_Object Qintegerp, Qnumberp, Qnatnump, Qwholenump; |
1350 extern Lisp_Object Qsymbolp, Qlistp, Qconsp; | 1359 extern Lisp_Object Qsymbolp, Qlistp, Qconsp; |
1351 extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; | 1360 extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; |
1352 extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qvectorp; | 1361 extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qvectorp; |
1353 extern Lisp_Object Qinteger_or_marker_p, Qnumber_or_marker_p; | 1362 extern Lisp_Object Qinteger_or_marker_p, Qnumber_or_marker_p; |
1354 extern Lisp_Object Qchar_table_p; | 1363 extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p; |
1355 extern Lisp_Object Qboundp, Qfboundp; | 1364 extern Lisp_Object Qboundp, Qfboundp; |
1356 extern Lisp_Object Qbuffer_or_string_p; | 1365 extern Lisp_Object Qbuffer_or_string_p; |
1357 extern Lisp_Object Qcdr; | 1366 extern Lisp_Object Qcdr; |
1358 | 1367 |
1359 #ifdef LISP_FLOAT_TYPE | 1368 #ifdef LISP_FLOAT_TYPE |
1471 extern Lisp_Object make_event_array (), make_uninit_string (); | 1480 extern Lisp_Object make_event_array (), make_uninit_string (); |
1472 extern Lisp_Object Fpurecopy (), make_pure_string (); | 1481 extern Lisp_Object Fpurecopy (), make_pure_string (); |
1473 extern Lisp_Object pure_cons (), make_pure_vector (); | 1482 extern Lisp_Object pure_cons (), make_pure_vector (); |
1474 extern Lisp_Object Fgarbage_collect (); | 1483 extern Lisp_Object Fgarbage_collect (); |
1475 extern Lisp_Object Fmake_byte_code (); | 1484 extern Lisp_Object Fmake_byte_code (); |
1485 extern Lisp_Object Qchar_table_extra_slots; | |
1476 extern struct Lisp_Vector *allocate_vectorlike (); | 1486 extern struct Lisp_Vector *allocate_vectorlike (); |
1477 extern int gc_in_progress; | 1487 extern int gc_in_progress; |
1478 | 1488 |
1479 /* Defined in print.c */ | 1489 /* Defined in print.c */ |
1480 extern Lisp_Object Vprin1_to_string_buffer; | 1490 extern Lisp_Object Vprin1_to_string_buffer; |