summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-02-14 02:42:45 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-02-14 02:42:45 +0000
commitc273429337771fd0318b4f45cbd21eed4bf48e4d (patch)
tree6572ed0e649990b3135274e5ae69e60c57a589c9
parent53dc03721a07dcc37589add0bad646f88e60a2cf (diff)
downloademacs-c273429337771fd0318b4f45cbd21eed4bf48e4d.tar.gz
(sgml-mode): Fix comment syntax.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/textmodes/sgml-mode.el8
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9233db66710..a92d8d16c73 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index ed7bd87237a..37531306aa6 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -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