Subject: Re: bug#37521: breakage in emacs 26.3 + nxml

From: Rolf Ade <[email-masked]>
Date: Fri, 27 Sep 2019 13:22:20 +0200

[Added Noam to CC because it seems a commit by him introduced this.]

Rolf Ade <[email-masked]> writes:
> Allin Cottrell <[email-masked]> writes:
>
>> There's a broken interaction between unescaped '>' (ASCII 62) and
>> apostrophe (ASCII 39) when editing an XML file in nxml mode in emacs
>> 26.3. (Version 26.2 was OK.)
>>
>> At the first apostrophe following an unescaped '>', the font color
>> switches to "within delimiters" mode, and, depending on the context,
>> certain nxml editing commands stop working properly.
>>
>> Here are two little examples. The first just shows the unwanted change
>> in face:
>>
>> <?xml version="1.0"?>
>>
>> <p>Here's some text, including the inequality 3 > 2. And here's
>> what happens in following text once an apostrophe comes along.
>> </p>
>>
>> The second example shows what happens when the apostrophe is inside a
>> tag. If you delete the trailing "</p>" below, then try to insert it
>> again via the shortcut C-c C-f, it's "</tt>" that gets inserted
>> instead:
>>
>> <?xml version="1.0"?>
>>
>> <p>Here's some text, including the inequality 3 > 2. And here is an
>> apostrophe inside a tag: <tt>'</tt>. Plus some following text and
>> so on.</p>
>
> But in fact on current emacs-26 (as of commit
> bd0f173199c112b2b146e727f80e973e7fc12143)
>
> there is the by Allin described (wrong) behaviour.

To be more precise, since

commit 7dab3ee7ab54b3c2e7bc24170376054786c01d6f
Author: Noam Postavsky <[email-masked]>
Date:   Sun Apr 21 22:44:50 2019 -0400

the behaviour is as reported in the bug report.

With state of the previous

commit e4cde42657f8f91f795e6b7041dc50b896dc468d
Author: Noam Postavsky <[email-masked]>
Date:   Fri Apr 19 13:28:00 2019 -0400

the behaviour is like 26.2 and, as alredy reported, on master (and
correct).