diff options
author | 2011-09-26 03:29:09 +0400 | |
---|---|---|
committer | 2011-09-26 03:29:09 +0400 | |
commit | b98afb49da59260e2f26f1e9be3e1c0415729355 (patch) | |
tree | ca19e9da38e9ebc5af159add4c5b732e5de2f720 | |
parent | 3a4d6cc2769e92b7d92b3d23f560aa40e60f2a8b (diff) |
Tweaked Emacs mode to handle many "->" faster.
-rw-r--r-- | src/elisp/urweb-mode.el | 6 |
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 |