mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 07:11:34 -08:00
(SYNTAX_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_NESTED):
Add support for nested comments.
This commit is contained in:
parent
95ff8dfc3c
commit
c03649190c
1 changed files with 7 additions and 1 deletions
|
|
@ -158,12 +158,14 @@ extern Lisp_Object syntax_parent_lookup P_ ((Lisp_Object, int));
|
|||
: Qnil))
|
||||
#endif
|
||||
|
||||
/* Then there are six single-bit flags that have the following meanings:
|
||||
/* Then there are seven single-bit flags that have the following meanings:
|
||||
1. This character is the first of a two-character comment-start sequence.
|
||||
2. This character is the second of a two-character comment-start sequence.
|
||||
3. This character is the first of a two-character comment-end sequence.
|
||||
4. This character is the second of a two-character comment-end sequence.
|
||||
5. This character is a prefix, for backward-prefix-chars.
|
||||
6. see below
|
||||
7. This character is part of a nestable comment sequence.
|
||||
Note that any two-character sequence whose first character has flag 1
|
||||
and whose second character has flag 2 will be interpreted as a comment start.
|
||||
|
||||
|
|
@ -188,6 +190,8 @@ extern Lisp_Object syntax_parent_lookup P_ ((Lisp_Object, int));
|
|||
|
||||
#define SYNTAX_COMMENT_STYLE(c) ((SYNTAX_WITH_FLAGS (c) >> 21) & 1)
|
||||
|
||||
#define SYNTAX_COMMENT_NESTED(c) ((SYNTAX_WITH_FLAGS (c) >> 22) & 1)
|
||||
|
||||
/* These macros extract specific flags from an integer
|
||||
that holds the syntax code and the flags. */
|
||||
|
||||
|
|
@ -203,6 +207,8 @@ extern Lisp_Object syntax_parent_lookup P_ ((Lisp_Object, int));
|
|||
|
||||
#define SYNTAX_FLAGS_COMMENT_STYLE(flags) (((flags) >> 21) & 1)
|
||||
|
||||
#define SYNTAX_FLAGS_COMMENT_NESTED(flags) (((flags) >> 22) & 1)
|
||||
|
||||
/* This array, indexed by a character, contains the syntax code which that
|
||||
character signifies (as a char). For example,
|
||||
(enum syntaxcode) syntax_spec_code['w'] is Sword. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue