# HG changeset patch # User Vladimir Shabanov # Date 1316993349 -14400 # Node ID 7328dfeb7c0f242074a26fa109a0f767075d44e8 # Parent 9c7b79214caef4f327b301f2cfac13d10f2c4d2a Tweaked Emacs mode to handle many "->" faster. diff -r 9c7b79214cae -r 7328dfeb7c0f src/elisp/urweb-mode.el --- 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 "") (incf depth)) + ((looking-at "-") + (if (looking-at "->") + (setq finished (= depth 0)))) + ((and (= depth 0) (not (looking-at " (eq font-lock-tag-face