diff options
| author | Stefan Monnier | 2002-03-27 22:27:44 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-03-27 22:27:44 +0000 |
| commit | 843e95014b85b78ea00e2fae4946a011e0951de3 (patch) | |
| tree | d66b7810f8be57d9a5b9e56c8e4bc2bef0c21792 | |
| parent | 7a5fb450aaa25b4e5749c039568ec06f183165b4 (diff) | |
| download | emacs-843e95014b85b78ea00e2fae4946a011e0951de3.tar.gz emacs-843e95014b85b78ea00e2fae4946a011e0951de3.zip | |
(xml-lite-in-string-p): Simplify.
| -rw-r--r-- | lisp/textmodes/xml-lite.el | 8 |
1 files 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." | |||
| 95 | (bolp))) | 95 | (bolp))) |
| 96 | 96 | ||
| 97 | (defun xml-lite-in-string-p (&optional limit) | 97 | (defun xml-lite-in-string-p (&optional limit) |
| 98 | "Determine whether point is inside a string." | 98 | "Determine whether point is inside a string. |
| 99 | |||
| 100 | Parse begins from LIMIT, which defaults to the preceding occurence of a tag | ||
| 101 | at the beginning of a line." | ||
| 99 | (let (syntax-info) | 102 | (let (syntax-info) |
| 100 | (or limit | 103 | (or limit |
| 101 | (setq limit (or (save-excursion | 104 | (setq limit (or (save-excursion |
| 102 | (re-search-backward "^[ \t]*<" nil t)) | 105 | (re-search-backward "^[ \t]*<" nil t)) |
| 103 | (point-min)))) | 106 | (point-min)))) |
| 104 | (setq syntax-info (parse-partial-sexp limit (point))) | 107 | (setq syntax-info (parse-partial-sexp limit (point))) |
| 105 | (if (nth 3 syntax-info) | 108 | (if (nth 3 syntax-info) (nth 8 syntax-info)))) |
| 106 | (list (nth 3 syntax-info) (nth 8 syntax-info))))) | ||
| 107 | 109 | ||
| 108 | 110 | ||
| 109 | ;; Parsing | 111 | ;; Parsing |