From ec4d63f31c41941af3e85f9493ebc5cfed8be90e Mon Sep 17 00:00:00 2001 From: Dave Mayo Date: Sun, 24 Aug 2014 17:12:24 -0400 Subject: Refs #38, Close #39. Save match data around css cursor positioning. --- src/mode-def.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mode-def.el b/src/mode-def.el index be615db..6a7f5aa 100644 --- a/src/mode-def.el +++ b/src/mode-def.el @@ -232,9 +232,10 @@ See also `emmet-expand-line'." (defun emmet-css-next-insert-point (str) (let ((regexp (if emmet-use-sass-syntax ": *\\($\\)" ": *\\(;\\)$"))) - (set-match-data nil t) - (string-match regexp str) - (or (match-beginning 1) (length str)))) + (save-match-data + (set-match-data nil t) + (string-match regexp str) + (or (match-beginning 1) (length str))))) (defvar emmet-flash-ovl nil) (make-variable-buffer-local 'emmet-flash-ovl) -- cgit v1.2.3