]> git.eshelyaron.com Git - emacs.git/commitdiff
* textmodes/sgml-mode.el (sgml-lexical-context): Recognise
authorChong Yidong <cyd@stupidchicken.com>
Sat, 5 Dec 2009 20:23:25 +0000 (20:23 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 5 Dec 2009 20:23:25 +0000 (20:23 +0000)
comment-start-skip to comment-end-skip as comment (Bug#4781).

lisp/ChangeLog
lisp/textmodes/sgml-mode.el

index 59f664603146fc5e3aabae29e7f87bae3f27dad4..3e5a9875a2f5a829af1b4e48c73e37dd4776f477 100644 (file)
@@ -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
index 52d0a70e257b8a4ca7cffe4a2ca5c55043baae4b..7cefa160ed1c8dced14b3c5ad1256002d449a4e3 100644 (file)
@@ -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