* lisp/nxml/nxml-mode.el (nxml-fontify-matcher): Make sure propertization
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 16 Apr 2014 15:28:26 +0000 (11:28 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 16 Apr 2014 15:28:26 +0000 (11:28 -0400)
was done.
* lisp/nxml/xmltok.el (xmltok-scan-after-comment-open): Extend unclosed
comment to EOB.

Fixes: debbugs:17264

lisp/ChangeLog
lisp/nxml/nxml-mode.el
lisp/nxml/xmltok.el
test/indent/nxml.xml [new file with mode: 0644]

index 38f71bd..e974b30 100644 (file)
@@ -1,5 +1,10 @@
 2014-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * nxml/nxml-mode.el (nxml-fontify-matcher): Make sure propertization
+       was done (bug#17264).
+       * nxml/xmltok.el (xmltok-scan-after-comment-open): Extend unclosed
+       comment to EOB.
+
        * progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in
        here-documents (bug#17262).
 
index 0daf62d..cd50bce 100644 (file)
@@ -872,7 +872,7 @@ Called with `font-lock-beg' and `font-lock-end' dynamically bound."
 
 (defun nxml-fontify-matcher (bound)
   "Called as font-lock keyword matcher."
-
+  (syntax-propertize bound)
   (unless nxml-degraded
     (nxml-debug-change "nxml-fontify-matcher" (point) bound)
 
index 58a2f16..f80a5fd 100644 (file)
@@ -750,7 +750,8 @@ Return the type of the token."
                  ;; Need do this after the goto-char because
                  ;; marked error should just apply to <!--
                  (xmltok-add-error "First following `--' not followed by `>'")
-                 'not-well-formed)))))
+                 (goto-char (point-max))
+                 'comment)))))
 
 (defun xmltok-scan-attributes ()
   (let ((recovering nil)
diff --git a/test/indent/nxml.xml b/test/indent/nxml.xml
new file mode 100644 (file)
index 0000000..61b84f2
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<spocosy version="1.0" responsetime="2011-03-15 13:53:12" exec="0.171">
+  <!--
+      <query-response requestid="" service="objectquery">
+      <sport name="Soccer" enetSportCode="s" del="no" n="1" ut="2009-12-29
+      15:36:24" id="1">
+      </sport>
+      </query-response>
+  -->
+</spocosy>