]> git.eshelyaron.com Git - emacs.git/commitdiff
(sgml-mode): Fix comment syntax.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 14 Feb 2008 02:42:45 +0000 (02:42 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 14 Feb 2008 02:42:45 +0000 (02:42 +0000)
lisp/ChangeLog
lisp/textmodes/sgml-mode.el

index 9233db6671015d6ebb15ec98a869688427333cdc..a92d8d16c735b126344bbd2bbf7faaf70d19eba6 100644 (file)
@@ -1,3 +1,7 @@
+2008-02-14  Stefan Monnier  <monnier@pastel.home>
+
+       * textmodes/sgml-mode.el (sgml-mode): Fix comment syntax.
+
 2008-02-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * hilit-chg.el (highlight-save-buffer-state): New macro.
index ed7bd87237aa730364e1f287f6b59a06c8d38774..37531306aa67c9b84fc872d08171a8171e3294fb 100644 (file)
@@ -469,8 +469,12 @@ Do \\[describe-key] on the following bindings to discover what they do.
          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