summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vladimir Shabanov <vshabanoff@gmail.com>2011-09-26 03:29:09 +0400
committerGravatar Vladimir Shabanov <vshabanoff@gmail.com>2011-09-26 03:29:09 +0400
commit26da03398a3ecee9985726d7f5f71a082ee57ec1 (patch)
treeca19e9da38e9ebc5af159add4c5b732e5de2f720
parentdfafca5fcf01c61ed0183e4b80cdef90dfbfa822 (diff)
Tweaked Emacs mode to handle many "->" faster.
-rw-r--r--src/elisp/urweb-mode.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/elisp/urweb-mode.el b/src/elisp/urweb-mode.el
index ea14b4e1..b9ffaf10 100644
--- a/src/elisp/urweb-mode.el
+++ b/src/elisp/urweb-mode.el
@@ -170,7 +170,7 @@ See doc for the variable `urweb-mode-info'."
(finished nil)
(answer nil)
)
- (while (and (not finished) (re-search-backward "[<{}]" nil t))
+ (while (and (not finished) (re-search-backward "[-<{}]" nil t))
(cond
((looking-at "{")
(if (> depth 0)
@@ -187,6 +187,10 @@ See doc for the variable `urweb-mode-info'."
((looking-at "</xml>")
(incf depth))
+ ((looking-at "-")
+ (if (looking-at "->")
+ (setq finished (= depth 0))))
+
((and (= depth 0)
(not (looking-at "<xml")) ;; ignore <xml/>
(eq font-lock-tag-face