Commit 843e9501 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(xml-lite-in-string-p): Simplify.

parent 7a5fb450
......@@ -95,15 +95,17 @@ Set this to nil if you don't want a modeline indicator for xml-lite-mode."
(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))
(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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment