Mercurial > emacs
comparison lisp/textmodes/sgml-mode.el @ 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 | 18698b6aca31 |
children | 1d1d5d9bd884 |
comparison
equal
deleted
inserted
replaced
106434:de4084d806f6 | 106435:9e1a89d804c8 |
---|---|
1064 ((looking-at "<!\\[[A-Z]+\\[") | 1064 ((looking-at "<!\\[[A-Z]+\\[") |
1065 ;; We've found a CDATA section or similar. | 1065 ;; We've found a CDATA section or similar. |
1066 (let ((cdata-start (point))) | 1066 (let ((cdata-start (point))) |
1067 (unless (search-forward "]]>" pos 'move) | 1067 (unless (search-forward "]]>" pos 'move) |
1068 (list 0 nil nil 'cdata nil nil nil nil cdata-start)))) | 1068 (list 0 nil nil 'cdata nil nil nil nil cdata-start)))) |
1069 ((looking-at comment-start-skip) | |
1070 ;; parse-partial-sexp doesn't handle <!-- comments -->, | |
1071 ;; or only if ?- is in sgml-specials, so match explicitly | |
1072 (let ((start (point))) | |
1073 (unless (re-search-forward comment-end-skip pos 'move) | |
1074 (list 0 nil nil nil t nil nil nil start)))) | |
1069 ((and sgml-xml-mode (looking-at "<\\?")) | 1075 ((and sgml-xml-mode (looking-at "<\\?")) |
1070 ;; Processing Instructions. | 1076 ;; Processing Instructions. |
1071 ;; In SGML, it's basically a normal tag of the form | 1077 ;; In SGML, it's basically a normal tag of the form |
1072 ;; <?NAME ...> but in XML, it takes the form <? ... ?>. | 1078 ;; <?NAME ...> but in XML, it takes the form <? ... ?>. |
1073 (let ((pi-start (point))) | 1079 (let ((pi-start (point))) |