diff lisp/textmodes/sgml-mode.el @ 80120:09b5c9664c42

(sgml-mode): Fix comment syntax.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 14 Feb 2008 02:42:45 +0000
parents dc100f64b2b7
children f991f10f15ec
line wrap: on
line diff
--- a/lisp/textmodes/sgml-mode.el	Thu Feb 14 00:48:20 2008 +0000
+++ b/lisp/textmodes/sgml-mode.el	Thu Feb 14 02:42:45 2008 +0000
@@ -469,8 +469,12 @@
          sgml-transformation-function))
   ;; This will allow existing comments within declarations to be
   ;; recognized.
-  (set (make-local-variable 'comment-start-skip) "\\(?:<!\\)?--[ \t]*")
-  (set (make-local-variable 'comment-end-skip) "[ \t]*--\\([ \t\n]*>\\)?")
+  ;; I can't find a clear description of SGML/XML comments, but it seems that
+  ;; the only reliable ones are <!-- ... --> although it's not clear what
+  ;; "..." can contain.  It used to accept -- ... -- as well, but that was
+  ;; apparently a mistake.
+  (set (make-local-variable 'comment-start-skip) "<!--[ \t]*")
+  (set (make-local-variable 'comment-end-skip) "[ \t]*--[ \t\n]*>")
   ;; This definition has an HTML leaning but probably fits well for other modes.
   (setq imenu-generic-expression
 	`((nil