mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
protect the evaluated string.
This commit is contained in:
parent
43c5aa3a5a
commit
e48806e04f
@ -260,7 +260,10 @@ a list of modes like this to help the judgement."
|
||||
(defun yas/eval-string (string)
|
||||
"Evaluate STRING and convert the result to string."
|
||||
(condition-case err
|
||||
(format "%s" (eval (read string)))
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(save-match-data
|
||||
(format "%s" (eval (read string))))))
|
||||
(error (format "(error in elisp evaluation: %s)"
|
||||
(error-message-string err)))))
|
||||
(defun yas/calculate-field-value (field value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user