]> git.eshelyaron.com Git - emacs.git/commit
(RE_SETUP_SYNTAX_TABLE_FOR_OBJECT): Simplify
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 12 Apr 2023 20:32:39 +0000 (16:32 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 12 Apr 2023 20:32:39 +0000 (16:32 -0400)
commit861cf3a5c9d2081d811dcfc2c5ce5357f3dc44d4
tree9431d7ef315d5a4081cb3fc65487c3fdd35354d7
parentc2c3114961802b4c52b4cde0271e460fb08698cf
(RE_SETUP_SYNTAX_TABLE_FOR_OBJECT): Simplify

It turns out all calls to this function pass the same value
for the `count` argument, and they're all in `regexp.c`.

* src/syntax.c (RE_SETUP_SYNTAX_TABLE_FOR_OBJECT):
Rename from `SETUP_SYNTAX_TABLE_FOR_OBJECT`.  Remove `count` argument.
Move call to `RE_SYNTAX_TABLE_BYTE_TO_CHAR` to where its result is
actually used.
* src/regex-emacs.c (re_search_2, re_match_2): Adjust accordingly.

* src/syntax.h (RE_SYNTAX_TABLE_BYTE_TO_CHAR): Rename from
`SYNTAX_TABLE_BYTE_TO_CHAR` to clarify that it takes a byteoffset as
used in the regexp engine and not a "bytepos".  Adjust all callers.
src/regex-emacs.c
src/syntax.c
src/syntax.h