Subject: bug#18871: 24.4; nxml-mode: DTD edition breaks the file structure

From: Marcin Borkowski <[email-masked]>
Date: Tue, 01 Mar 2016 17:15:41 +0100

On 2014-10-28, at 15:34, Vincent Lefevre <[email-masked]> wrote:

> Consider the following XML file:
>
> ------------------------------------------------------------------
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE root [
> <!ELEMENT root (item)*>
> <!ELEMENT item (#PCDATA)>
> ]>
>
> <root>
> <!-- 1234567890 1234567890 1234567890 1234567890 1234567890 -->
> </root>
> ------------------------------------------------------------------
>
> 1. Open it with "emacs -Q".
> 2. Go to line 2 and type C-SPC.
> 3. Go to line 6 and type C-w to delete the DTD.
>
> The highlighting gets completely wrong. And if I delete the closing
> tag </root> (with C-k) and type C-c C-f, I get the error:
>
>   No matching start-tag
>
> In more complex files, slightly editing the DTD gives the same behavior.

Hello and thanks for your report.

However, I have just tried to reproduce this behavior on GNU Emacs
25.1.50.4 (commit f182640), and could not.  Could you confirm that this
is no longer a problem?  (If you do not want to compile Emacs from the
Git repo, maybe try the latest pretest, see
http://alpha.gnu.org/gnu/emacs/pretest/)

Best,

-- 
Marcin Borkowski