changeset 1566:7328dfeb7c0f

Tweaked Emacs mode to handle many "->" faster.
author Vladimir Shabanov <vshabanoff@gmail.com>
date Mon, 26 Sep 2011 03:29:09 +0400
parents 9c7b79214cae
children 5691ec310618
files src/elisp/urweb-mode.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/elisp/urweb-mode.el	Mon Sep 26 02:54:52 2011 +0400
+++ b/src/elisp/urweb-mode.el	Mon Sep 26 03:29:09 2011 +0400
@@ -170,7 +170,7 @@
           (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 @@
          ((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