aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorMattias EngdegÄrd2023-06-20 12:12:50 +0200
committerMattias EngdegÄrd2023-06-21 18:00:26 +0200
commitbe91192ecb1e0dff794582cd463f0a6480d160ef (patch)
tree156031723d39088ce4e2dd52a3a7b7068fbc5880 /java
parentdae8aab52874441a70a94435d50f25b27301d9b0 (diff)
downloademacs-be91192ecb1e0dff794582cd463f0a6480d160ef.tar.gz
emacs-be91192ecb1e0dff794582cd463f0a6480d160ef.zip
Straighten regexp postfix operator after zero-width assertion parse
The zero-width assertions \` \' \b \B were parsed in a sloppy way so that a following postfix repetition operator could yield surprising results. For instance, "\\b*" would act as "\\b\\*", and "xy\\b*" would act as "\\(?:xy\\b\\)*". Except for \` and ^, any following postfix operator now applies to the zero-width assertion itself only, which is predictable and consistent with other assertions, if useless in practice. For historical compatibility, an operator character following \` and ^ always becomes a literal. (Bug#64128) * src/regex-emacs.c (regex_compile): Set `laststart` appropriately for each zero-width assertion instead of leaving it with whatever value it had before. Remove a redundant condition. * test/src/regex-emacs-tests.el (regexp-tests-zero-width-assertion-repetition): New test. * doc/lispref/searching.texi (Regexp Special): Say that repetition operators are not special after \`, and that they work as expected after other backslash escapes. * etc/NEWS: Announce.
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions