mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 23:10:47 -08:00
(regex_compile): Set the new `used_syntax' bit.
This commit is contained in:
parent
1351dd3b9a
commit
6224b623fd
1 changed files with 9 additions and 0 deletions
|
|
@ -2530,6 +2530,7 @@ regex_compile (pattern, size, syntax, bufp)
|
|||
bufp->syntax = syntax;
|
||||
bufp->fastmap_accurate = 0;
|
||||
bufp->not_bol = bufp->not_eol = 0;
|
||||
bufp->used_syntax = 0;
|
||||
|
||||
/* Set `used' to zero, so that if we return an error, the pattern
|
||||
printer (for debugging) will think there's no pattern. We reset it
|
||||
|
|
@ -2942,6 +2943,14 @@ regex_compile (pattern, size, syntax, bufp)
|
|||
SET_LIST_BIT (translated);
|
||||
}
|
||||
|
||||
/* In most cases the matching rule for char classes
|
||||
only uses the syntax table for multibyte chars,
|
||||
so that the content of the syntax-table it is not
|
||||
hardcoded in the range_table. SPACE and WORD are
|
||||
the two exceptions. */
|
||||
if ((1 << cc) & ((1 << RECC_SPACE) | (1 << RECC_WORD)))
|
||||
bufp->used_syntax = 1;
|
||||
|
||||
/* Repeat the loop. */
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue