]> code.delx.au - gnu-emacs-elpa/commitdiff
Closes #474: fix cc-mode fontification conflict
authorNoam Postavsky <npostavs@users.sourceforge.net>
Sat, 26 Apr 2014 23:26:54 +0000 (19:26 -0400)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Sun, 27 Apr 2014 18:49:05 +0000 (14:49 -0400)
* yasnippet.el (yas--save-backquotes): don't change buffer while
narrowed.

yasnippet.el

index 252083a7aedba784a835f14c0b59bd54703bc186..e2dbca0a671892af262c60ddd7f241027b5af352 100644 (file)
@@ -3907,7 +3907,8 @@ With optional string TEXT do it in string instead of the buffer."
 with their evaluated value into `yas--backquote-markers-and-strings'."
   (while (re-search-forward yas--backquote-lisp-expression-regexp nil t)
     (let ((current-string (match-string-no-properties 1)) transformed)
-      (delete-region (match-beginning 0) (match-end 0))
+      (save-restriction (widen)
+                        (delete-region (match-beginning 0) (match-end 0)))
       (setq transformed (yas--eval-lisp (yas--read-lisp (yas--restore-escapes current-string '(?`)))))
       (goto-char (match-beginning 0))
       (when transformed