diff options
| author | Kenichi Handa | 2003-09-08 12:53:41 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2003-09-08 12:53:41 +0000 |
| commit | 8f924df7df019cce90537647de2627581043b5c4 (patch) | |
| tree | 6c40bd05679425e710d6b2e5649eae3da5e40a52 /src/syntax.h | |
| parent | 463f5630a5e7cbe7f042bc1175d1fa1c4e98860f (diff) | |
| parent | 9d4807432a01f9b3cc519fcfa3ea92a70ffa7f43 (diff) | |
| download | emacs-8f924df7df019cce90537647de2627581043b5c4.tar.gz emacs-8f924df7df019cce90537647de2627581043b5c4.zip | |
*** empty log message ***
Diffstat (limited to 'src/syntax.h')
| -rw-r--r-- | src/syntax.h | 43 |
1 files changed, 8 insertions, 35 deletions
diff --git a/src/syntax.h b/src/syntax.h index 6d8f201baeb..bdf7ebb31bd 100644 --- a/src/syntax.h +++ b/src/syntax.h | |||
| @@ -57,37 +57,14 @@ enum syntaxcode | |||
| 57 | 57 | ||
| 58 | /* Set the syntax entry VAL for char C in table TABLE. */ | 58 | /* Set the syntax entry VAL for char C in table TABLE. */ |
| 59 | 59 | ||
| 60 | #define SET_RAW_SYNTAX_ENTRY(table, c, val) \ | 60 | #define SET_RAW_SYNTAX_ENTRY(table, c, val) \ |
| 61 | ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS \ | 61 | CHAR_TABLE_SET ((table), c, (val)) |
| 62 | ? (XCHAR_TABLE (table)->contents[(unsigned char) (c)] = (val)) \ | ||
| 63 | : Faset ((table), make_number (c), (val))) | ||
| 64 | 62 | ||
| 65 | /* Fetch the syntax entry for char C in syntax table TABLE. | 63 | /* Set the syntax entry VAL for char-range RANGE in table TABLE. |
| 66 | This macro is called only when C is less than CHAR_TABLE_ORDINARY_SLOTS. | 64 | RANGE is a cons (FROM . TO) specifying the range of characters. */ |
| 67 | Do inheritance. */ | ||
| 68 | 65 | ||
| 69 | #ifdef __GNUC__ | 66 | #define SET_RAW_SYNTAX_ENTRY_RANGE(table, range, val) \ |
| 70 | #define SYNTAX_ENTRY_FOLLOW_PARENT(table, c) \ | 67 | Fset_char_table_range ((table), (range), (val)) |
| 71 | ({ Lisp_Object tbl = table; \ | ||
| 72 | Lisp_Object temp = XCHAR_TABLE (tbl)->contents[(c)]; \ | ||
| 73 | while (NILP (temp)) \ | ||
| 74 | { \ | ||
| 75 | tbl = XCHAR_TABLE (tbl)->parent; \ | ||
| 76 | if (NILP (tbl)) \ | ||
| 77 | break; \ | ||
| 78 | temp = XCHAR_TABLE (tbl)->contents[(c)]; \ | ||
| 79 | } \ | ||
| 80 | temp; }) | ||
| 81 | #else | ||
| 82 | extern Lisp_Object syntax_temp; | ||
| 83 | extern Lisp_Object syntax_parent_lookup P_ ((Lisp_Object, int)); | ||
| 84 | |||
| 85 | #define SYNTAX_ENTRY_FOLLOW_PARENT(table, c) \ | ||
| 86 | (syntax_temp = XCHAR_TABLE (table)->contents[(c)], \ | ||
| 87 | (NILP (syntax_temp) \ | ||
| 88 | ? syntax_parent_lookup (table, (c)) \ | ||
| 89 | : syntax_temp)) | ||
| 90 | #endif | ||
| 91 | 68 | ||
| 92 | /* SYNTAX_ENTRY fetches the information from the entry for character C | 69 | /* SYNTAX_ENTRY fetches the information from the entry for character C |
| 93 | in syntax table TABLE, or from globally kept data (gl_state). | 70 | in syntax table TABLE, or from globally kept data (gl_state). |
| @@ -105,12 +82,7 @@ extern Lisp_Object syntax_parent_lookup P_ ((Lisp_Object, int)); | |||
| 105 | # define CURRENT_SYNTAX_TABLE current_buffer->syntax_table | 82 | # define CURRENT_SYNTAX_TABLE current_buffer->syntax_table |
| 106 | #endif | 83 | #endif |
| 107 | 84 | ||
| 108 | #define SYNTAX_ENTRY_INT(c) \ | 85 | #define SYNTAX_ENTRY_INT(c) CHAR_TABLE_REF (CURRENT_SYNTAX_TABLE, (c)) |
| 109 | ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS \ | ||
| 110 | ? SYNTAX_ENTRY_FOLLOW_PARENT (CURRENT_SYNTAX_TABLE, \ | ||
| 111 | (unsigned char) (c)) \ | ||
| 112 | : Faref (CURRENT_SYNTAX_TABLE, \ | ||
| 113 | make_number (c))) | ||
| 114 | 86 | ||
| 115 | /* Extract the information from the entry for character C | 87 | /* Extract the information from the entry for character C |
| 116 | in the current syntax table. */ | 88 | in the current syntax table. */ |
| @@ -137,6 +109,7 @@ extern Lisp_Object syntax_parent_lookup P_ ((Lisp_Object, int)); | |||
| 137 | ? XCDR (temp) \ | 109 | ? XCDR (temp) \ |
| 138 | : Qnil); }) | 110 | : Qnil); }) |
| 139 | #else | 111 | #else |
| 112 | extern Lisp_Object syntax_temp; | ||
| 140 | #define SYNTAX(c) \ | 113 | #define SYNTAX(c) \ |
| 141 | (syntax_temp = SYNTAX_ENTRY ((c)), \ | 114 | (syntax_temp = SYNTAX_ENTRY ((c)), \ |
| 142 | (CONSP (syntax_temp) \ | 115 | (CONSP (syntax_temp) \ |