Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings

From: "Roland Winkler" <[email-masked]>
Date: Fri, 21 Feb 2020 14:03:29 -0600

On Fri Feb 21 2020 Mattias Engdegård wrote:
> Correct me if I'm wrong, but it looks like the assumption is that
> all possible \-sequences have been enumerated in that list. More
> likely, some kind of anchoring after the match is needed, like
> word-end ("\\>"). Then the matching order doesn't matter.

I am not sure I understand.  The idea in bibtex-autokey-transcriptions
is that each match of OLD-REGEXP is replaced in full by NEW-STRING.
Subexpressions are ignored.

In LaTeX syntax, OLD-REGEXP can appear anywhere inside what LaTeX
considers a word (which even may include spaces).  So to make things
more fool-proofed, it would be necessary to parse more carefully the
LaTeX code.  I do not think this effort is needed here as these
regexps have worked well for at least two decades.  The patch fixes
a minor problem of these regexps pointed out by the OP.  But
otherwise it preserves their spirit.