diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-02-14 02:42:45 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-02-14 02:42:45 +0000 |
commit | 3032b23b8951793f768c8790f4b6b1a1244c36a8 (patch) | |
tree | ecdc5dfa8226c0915eba079ccc22c1fc87c2934c /lisp | |
parent | b4776aef88d08059c7a03f56bf58b3698804246f (diff) | |
download | emacs-3032b23b8951793f768c8790f4b6b1a1244c36a8.tar.gz |
(sgml-mode): Fix comment syntax.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/textmodes/sgml-mode.el | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0929fe7982e..6648979827d 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 |