From 5d1fd962bb92a07ef86138ba64f0e60d0302ad33 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 5 Dec 2009 20:23:25 +0000 Subject: [PATCH] * textmodes/sgml-mode.el (sgml-lexical-context): Recognise comment-start-skip to comment-end-skip as comment (Bug#4781). --- lisp/ChangeLog | 5 +++++ lisp/textmodes/sgml-mode.el | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 59f66460314..3e5a9875a2f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-12-05 Kevin Ryde + + * textmodes/sgml-mode.el (sgml-lexical-context): Recognise + comment-start-skip to comment-end-skip as comment (Bug#4781). + 2009-12-05 Juri Linkov * info.el (Info-find-node-2): Set `Info-current-subfile' to nil diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 52d0a70e257..7cefa160ed1 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -1066,6 +1066,12 @@ If nil, start from a preceding tag at indentation." (let ((cdata-start (point))) (unless (search-forward "]]>" pos 'move) (list 0 nil nil 'cdata nil nil nil nil cdata-start)))) + ((looking-at comment-start-skip) + ;; parse-partial-sexp doesn't handle , + ;; or only if ?- is in sgml-specials, so match explicitly + (let ((start (point))) + (unless (re-search-forward comment-end-skip pos 'move) + (list 0 nil nil nil t nil nil nil start)))) ((and sgml-xml-mode (looking-at "<\\?")) ;; Processing Instructions. ;; In SGML, it's basically a normal tag of the form -- 2.39.5