From: Mike Williams Date: Wed, 3 Apr 2002 12:13:29 +0000 (+0000) Subject: (sgml-lexical-context) X-Git-Tag: ttn-vms-21-2-B4~15807 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2cfd19d446d143510dc149da777d9f06c44e4bc0;p=emacs.git (sgml-lexical-context) (sgml-parse-tag-backward): Extend support for CDATA to include conditional sections. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a8ff77e20b..2acf3fafcdf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-04-03 Mike Williams + + * textmodes/sgml-mode.el (sgml-lexical-context) + (sgml-parse-tag-backward): Extend support for CDATA to include + conditional sections. + 2002-04-03 Pavel Jan,Bm(Bk * cus-start.el: Rename `autoselect-window' to diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 74f3f50d328..49201f5a893 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -864,7 +864,7 @@ and move to the line in the SGML document that caused it." (defun sgml-lexical-context (&optional limit) "Return the lexical context at point as (TYPE . START). START is the location of the start of the lexical element. -TYPE is one of `string', `comment', `tag', or `text'. +TYPE is one of `string', `comment', `tag', `cdata', or `text'. If non-nil LIMIT is a nearby position before point outside of any tag." ;; As usual, it's difficult to get a reliable answer without parsing the @@ -883,11 +883,11 @@ If non-nil LIMIT is a nearby position before point outside of any tag." ;; When entering this loop we're inside text. (setq text-start (point)) (skip-chars-forward "^<" pos) - (setq cdata-start (if (looking-at "" pos 'limit) + (search-forward "]]>" pos 'move) (setq state (parse-partial-sexp (point) pos 0)))) (cond (cdata-start (cons 'cdata cdata-start)) @@ -980,8 +980,8 @@ Leave point at the beginning of the tag." (setq tag-type 'comment tag-start (search-backward "