GNU bug report logs - #17264
24.4.50; nxml-mode does not apply comment face correctly

Previous Next

Package: emacs;

Reported by: "Jan D." <jan.h.d <at> swipnet.se>

Date: Mon, 14 Apr 2014 06:21:02 UTC

Severity: normal

Found in version 24.4.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 17264-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Jan D." <jan.h.d <at> swipnet.se>
Cc: 17264-done <at> debbugs.gnu.org
Subject: Re: bug#17264: 24.4.50;
 nxml-mode does not apply comment face correctly
Date: Wed, 16 Apr 2014 11:28:43 -0400
> The commented section is in comment face (red text color).
> Actual:
> The commented region is not in the comment-face, it is fontified as
> normal XML.

I installed the patch below which seems to help.  It's kind of a mess, tho.


        Stefan


=== modified file 'lisp/nxml/nxml-mode.el'
--- lisp/nxml/nxml-mode.el	2014-03-21 06:56:55 +0000
+++ lisp/nxml/nxml-mode.el	2014-04-16 15:22:57 +0000
@@ -872,7 +872,7 @@
 
 (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)
 

=== modified file 'lisp/nxml/xmltok.el'
--- lisp/nxml/xmltok.el	2014-03-21 06:56:55 +0000
+++ lisp/nxml/xmltok.el	2014-04-16 15:05:55 +0000
@@ -750,7 +750,8 @@
                  ;; 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)





This bug report was last modified 11 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.