Subject: bug#20001: Wrong commenting of comments in nXML mode

From: Paul Pogonyshev <[email-masked]>
Date: Wed, 4 Mar 2015 15:55:48 +0100

$ emacs -q

Create an XML buffer with the following:

<foo>
  <!-- comment -->
</foo>

Now C-x h M-; to comment out everything. Text becomes this:

<!-- <foo> -->
<!--   <\!-- comment -\-> -->
<!-- </foo> -->

which is not valid XML. This is even suggested by the mode itself. "<\!--"
should be "<!-\-" instead. Uncommenting should also take that into account.

Version: GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version
3.10.9) of 2015-03-03

Paul