# HG changeset patch # User Chong Yidong # Date 1260044605 0 # Node ID 9e1a89d804c8a0734912703a1c81115b46e9041e # Parent de4084d806f6a94325254a13610bea533d96e472 * textmodes/sgml-mode.el (sgml-lexical-context): Recognise comment-start-skip to comment-end-skip as comment (Bug#4781). diff -r de4084d806f6 -r 9e1a89d804c8 lisp/ChangeLog --- a/lisp/ChangeLog Sat Dec 05 20:16:42 2009 +0000 +++ b/lisp/ChangeLog Sat Dec 05 20:23:25 2009 +0000 @@ -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 -r de4084d806f6 -r 9e1a89d804c8 lisp/textmodes/sgml-mode.el --- a/lisp/textmodes/sgml-mode.el Sat Dec 05 20:16:42 2009 +0000 +++ b/lisp/textmodes/sgml-mode.el Sat Dec 05 20:23:25 2009 +0000 @@ -1066,6 +1066,12 @@ (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