emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 72c6c4c 32/60: Fix #618; save match data in yas--scan-sexp


From: João Távora
Subject: [elpa] master 72c6c4c 32/60: Fix #618; save match data in yas--scan-sexps
Date: Thu, 21 Jan 2016 22:35:59 +0000

branch: master
commit 72c6c4cd7b0e58631e0963ea5345890e1b0aa04b
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Fix #618; save match data in yas--scan-sexps
    
    * yasnippet.el (yas--scan-sexps): Save match data.
---
 yasnippet.el |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

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'."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]