diff --git a/yasnippet.el b/yasnippet.el index 706c86a..50973e9 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -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'."