From 843e95014b85b78ea00e2fae4946a011e0951de3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 27 Mar 2002 22:27:44 +0000 Subject: [PATCH] (xml-lite-in-string-p): Simplify. --- lisp/textmodes/xml-lite.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/textmodes/xml-lite.el b/lisp/textmodes/xml-lite.el index a32a7a8f8f4..2833ea88356 100644 --- a/lisp/textmodes/xml-lite.el +++ b/lisp/textmodes/xml-lite.el @@ -95,15 +95,17 @@ Set this to nil if you don't want a modeline indicator for xml-lite-mode." (bolp))) (defun xml-lite-in-string-p (&optional limit) - "Determine whether point is inside a string." + "Determine whether point is inside a string. + +Parse begins from LIMIT, which defaults to the preceding occurence of a tag +at the beginning of a line." (let (syntax-info) (or limit (setq limit (or (save-excursion (re-search-backward "^[ \t]*<" nil t)) (point-min)))) (setq syntax-info (parse-partial-sexp limit (point))) - (if (nth 3 syntax-info) - (list (nth 3 syntax-info) (nth 8 syntax-info))))) + (if (nth 3 syntax-info) (nth 8 syntax-info)))) ;; Parsing -- 2.39.2