mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
Don't lose error message when yas-good-grace is t
* yasnippet.el (yas--eval-lisp-no-saves): Pass error message to message function. (yas--handle-error): Pass "%s" to error to avoid accidentally interpreting % in the error message as format codes.
This commit is contained in:
parent
a80033d142
commit
580e5c64f6
@ -1250,7 +1250,7 @@ yasnippet keeps a list of modes like this to help the judgment."
|
||||
"Handle error depending on value of `yas-good-grace'."
|
||||
(let ((msg (yas--format "elisp error: %s" (error-message-string err))))
|
||||
(if yas-good-grace msg
|
||||
(error msg))))
|
||||
(error "%s" msg))))
|
||||
|
||||
(defun yas--eval-lisp (form)
|
||||
"Evaluate FORM and convert the result to string."
|
||||
@ -1272,7 +1272,7 @@ yasnippet keeps a list of modes like this to help the judgment."
|
||||
(defun yas--eval-lisp-no-saves (form)
|
||||
(condition-case err
|
||||
(eval form)
|
||||
(error (yas--handle-error err))))
|
||||
(error (message "%s" (yas--handle-error err)))))
|
||||
|
||||
(defun yas--read-lisp (string &optional nil-on-error)
|
||||
"Read STRING as a elisp expression and return it.
|
||||
|
Loading…
x
Reference in New Issue
Block a user