summaryrefslogtreecommitdiff
path: root/lisp/textmodes/sgml-mode.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-12-05 20:23:25 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-12-05 20:23:25 +0000
commit5d1fd962bb92a07ef86138ba64f0e60d0302ad33 (patch)
treec814706ccfc81b1ad33bbfa71b8d1c4a07e98194 /lisp/textmodes/sgml-mode.el
parent022eef6211c560013e6dda4c25b07921f8e9525c (diff)
downloademacs-5d1fd962bb92a07ef86138ba64f0e60d0302ad33.tar.gz
* textmodes/sgml-mode.el (sgml-lexical-context): Recognise
comment-start-skip to comment-end-skip as comment (Bug#4781).
Diffstat (limited to 'lisp/textmodes/sgml-mode.el')
-rw-r--r--lisp/textmodes/sgml-mode.el6
1 files changed, 6 insertions, 0 deletions
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 <!-- 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