Fix #618; save match data in yas--scan-sexps

* yasnippet.el (yas--scan-sexps): Save match data.
This commit is contained in:
Noam Postavsky 2015-10-11 21:18:52 -04:00
parent b6d924c83d
commit 72c6c4cd7b

View File

@ -4015,8 +4015,9 @@ with their evaluated value into `yas--backquote-markers-and-strings'."
(defun yas--scan-sexps (from count)
(ignore-errors
(with-syntax-table (standard-syntax-table)
(scan-sexps from count))))
(save-match-data ; `scan-sexps' may modify match data.
(with-syntax-table (standard-syntax-table)
(scan-sexps from count)))))
(defun yas--make-marker (pos)
"Create a marker at POS with nil `marker-insertion-type'."