Hi Mattias, On 2019/05/16 11:29, Mattias EngdegÄrd wrote: > 16 maj 2019 kl. 08.57 skrev phs : > Actually this one is documented: > > For historical compatibility, special characters are treated as ordinary > ones if they are in contexts where their special meanings make no sense. > For example, `*foo' treats `*' as ordinary since there is no preceding > expression on which the `*' can act. I missed that. Thanks for pointing it out. > and in any case the 'correct' behaviour would be to signal a syntax error, not repeat the empty string. I'd rather read `*' as meaning "repeat the empty string", as with `\(\)*', but this is a matter of taste, and historical compatibility is very important. BTW, can your scans of regexps tell if this compatibility is relied on a lot? It would be safe to replace `*' and `+' with `\*' and `\+' where this happens. I've just grep'ed quickly through the code and only noticed a risky use of "+" (and "[..]") in the definition of `term-word' in term.el > Thanks for reporting it, and you are right, that's a (known) bug in rx. When rx is fixed, I suggest we add the following extra tests (see patch) --phs