Mercurial > emacs
changeset 106435:9e1a89d804c8
* textmodes/sgml-mode.el (sgml-lexical-context): Recognise
comment-start-skip to comment-end-skip as comment (Bug#4781).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 05 Dec 2009 20:23:25 +0000 |
parents | de4084d806f6 |
children | 7e3cef0b7f84 |
files | lisp/ChangeLog lisp/textmodes/sgml-mode.el |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <user42@zip.com.au> + + * textmodes/sgml-mode.el (sgml-lexical-context): Recognise + comment-start-skip to comment-end-skip as comment (Bug#4781). + 2009-12-05 Juri Linkov <juri@jurta.org> * info.el (Info-find-node-2): Set `Info-current-subfile' to nil
--- 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 <!-- comments -->, + ;; 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