diff options
| author | Richard M. Stallman | 1992-09-02 23:42:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1992-09-02 23:42:24 +0000 |
| commit | a306d6f16fdcec7228288b27b279c1134e0e2e78 (patch) | |
| tree | 49966853da456f84fd42a54a5100195e7965b931 /src | |
| parent | 15d1a8dab697a64da935e8df8fa524e36499ff40 (diff) | |
| download | emacs-a306d6f16fdcec7228288b27b279c1134e0e2e78.tar.gz emacs-a306d6f16fdcec7228288b27b279c1134e0e2e78.zip | |
entered into RCS
Diffstat (limited to 'src')
| -rw-r--r-- | src/syntax.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/syntax.h b/src/syntax.h index 49905d9757c..005b2a2cd98 100644 --- a/src/syntax.h +++ b/src/syntax.h | |||
| @@ -57,14 +57,21 @@ enum syntaxcode | |||
| 57 | #define SYNTAX_MATCH(c) \ | 57 | #define SYNTAX_MATCH(c) \ |
| 58 | ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 8) & 0377) | 58 | ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 8) & 0377) |
| 59 | 59 | ||
| 60 | /* Then there are five single-bit flags that have the following meanings: | 60 | /* Then there are six single-bit flags that have the following meanings: |
| 61 | 1. This character is the first of a two-character comment-start sequence. | 61 | 1. This character is the first of a two-character comment-start sequence. |
| 62 | 2. This character is the second of a two-character comment-start sequence. | 62 | 2. This character is the second of a two-character comment-start sequence. |
| 63 | 3. This character is the first of a two-character comment-end sequence. | 63 | 3. This character is the first of a two-character comment-end sequence. |
| 64 | 4. This character is the second of a two-character comment-end sequence. | 64 | 4. This character is the second of a two-character comment-end sequence. |
| 65 | 5. This character is a prefix, for backward-prefix-chars. | 65 | 5. This character is a prefix, for backward-prefix-chars. |
| 66 | Note that any two-character sequence whose first character has flag 1 | 66 | Note that any two-character sequence whose first character has flag 1 |
| 67 | and whose second character has flag 2 will be interpreted as a comment start. */ | 67 | and whose second character has flag 2 will be interpreted as a comment start. |
| 68 | |||
| 69 | bit 6 is used to discriminate between two different comment styles. | ||
| 70 | Languages such as C++ allow two orthogonal syntax start/end pairs | ||
| 71 | and bit 6 is used to determine whether a comment-end or Scommentend | ||
| 72 | ends style a or b. Comment start sequences can start style a or b. | ||
| 73 | Style a is always the default. | ||
| 74 | */ | ||
| 68 | 75 | ||
| 69 | #define SYNTAX_COMSTART_FIRST(c) \ | 76 | #define SYNTAX_COMSTART_FIRST(c) \ |
| 70 | ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 16) & 1) | 77 | ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 16) & 1) |
| @@ -81,6 +88,10 @@ enum syntaxcode | |||
| 81 | #define SYNTAX_PREFIX(c) \ | 88 | #define SYNTAX_PREFIX(c) \ |
| 82 | ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 20) & 1) | 89 | ((XINT (XVECTOR (current_buffer->syntax_table)->contents[(unsigned char) (c)]) >> 20) & 1) |
| 83 | 90 | ||
| 91 | /* extract the comment style bit from the syntax table entry */ | ||
| 92 | #define SYNTAX_COMMENT_STYLE(c) \ | ||
| 93 | ((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 21) & 1) | ||
| 94 | |||
| 84 | /* This array, indexed by a character, contains the syntax code which that | 95 | /* This array, indexed by a character, contains the syntax code which that |
| 85 | character signifies (as a char). For example, | 96 | character signifies (as a char). For example, |
| 86 | (enum syntaxcode) syntax_spec_code['w'] is Sword. */ | 97 | (enum syntaxcode) syntax_spec_code['w'] is Sword. */ |