aboutsummaryrefslogtreecommitdiffstats
path: root/src/init.el
diff options
context:
space:
mode:
authorflyingleafe <flyingleafe@gmail.com>2014-10-01 22:37:41 +0400
committerflyingleafe <flyingleafe@gmail.com>2014-10-01 22:37:41 +0400
commit264e63ea70c69fd18b33f13e1837f12b36bcf8a7 (patch)
tree61b9a3ee20ca97dde29944b9f62030258599afa2 /src/init.el
parentc76f9e62501c240ed8bb9af46f59d2ce4b975b89 (diff)
downloademmet-mode-264e63ea70c69fd18b33f13e1837f12b36bcf8a7.tar.lz
emmet-mode-264e63ea70c69fd18b33f13e1837f12b36bcf8a7.tar.xz
emmet-mode-264e63ea70c69fd18b33f13e1837f12b36bcf8a7.zip
Fixed stack overflow error while checking for style tag and attr
Diffstat (limited to 'src/init.el')
-rw-r--r--src/init.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/init.el b/src/init.el
index 8e1d7f9..c6095f1 100644
--- a/src/init.el
+++ b/src/init.el
@@ -65,6 +65,14 @@
,then-form)
,@else-forms)))
+(defmacro emmet-find (direction regexp &optional limit-of-search repeat-count)
+ "Regexp-search in given direction, returning the position (or nil)
+and leaving the point in place."
+ `(save-excursion
+ (if (,(intern (concat "re-search-" direction))
+ ,regexp ,limit-of-search t ,repeat-count)
+ (match-beginning 0))))
+
(defun emmet-regex (regexp string refs)
"Return a list of (`ref') matches for a `regex' on a `string' or nil."
(if (string-match (concat "^" regexp "\\([^\n]*\\)$") string)