From 264e63ea70c69fd18b33f13e1837f12b36bcf8a7 Mon Sep 17 00:00:00 2001 From: flyingleafe Date: Wed, 1 Oct 2014 22:37:41 +0400 Subject: Fixed stack overflow error while checking for style tag and attr --- src/init.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/init.el') 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) -- cgit v1.2.3