1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 08:11:05 -08:00
emacs/test/src
Mattias Engdegård be91192ecb 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.
2023-06-21 18:00:26 +02:00
..
comp-resources Merge from origin/emacs-29 2023-06-10 06:42:43 -04:00
emacs-module-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lread-resources Make force-load-doc-strings work again 2022-08-07 10:25:03 +02:00
regex-resources
syntax-resources
alloc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
buffer-tests.el Rename with/without-narrowing to with/without-restriction 2023-02-13 20:11:28 +02:00
callint-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
callproc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
casefiddle-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
character-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
charset-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
chartab-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cmds-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
coding-tests.el Fix encoding with 'utf-8-auto' 2023-01-12 16:36:35 +02:00
comp-tests.el Merge from origin/emacs-29 2023-06-10 06:42:43 -04:00
data-tests.el Detect and prevent function alias loops in fset and defalias 2023-02-21 10:42:00 +01:00
decompress-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
doc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
editfns-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
emacs-module-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
emacs-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eval-tests.el Disallow creation of circular variable alias chains 2023-04-14 19:34:23 +02:00
fileio-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
filelock-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
floatfns-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
fns-tests.el Don't mutate constants in tests 2023-05-13 14:31:00 +02:00
font-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
image-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
indent-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
inotify-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
json-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
keyboard-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
keymap-tests.el Add tests for Bug#62207 2023-03-18 10:37:15 +01:00
lcms-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lread-tests.el Merge from origin/emacs-29 2023-05-26 07:04:03 -04:00
marker-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
minibuf-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
print-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
process-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
regex-emacs-tests.el Straighten regexp postfix operator after zero-width assertion parse 2023-06-21 18:00:26 +02:00
search-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sqlite-tests.el Fix loading SQLite extensions 2023-05-20 15:43:44 +03:00
syntax-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
textprop-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
thread-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
timefns-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
treesit-tests.el ; * src/treesit.c (treesit_query_string_string): fix last change 2023-06-17 11:56:22 +02:00
undo-tests.el undo-tests.el: Tests for bug#60467 2023-01-13 17:43:31 -05:00
xdisp-tests.el Don't mutate constants in tests 2023-05-13 14:31:00 +02:00
xfaces-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
xml-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00