Closed martenlienen closed 10 months ago
The change in introduced in 1d0966a checks if yas-buffer-local-condition is a cons before a function but lambdas in lexical environments get converted to closures which are also conses.
yas-buffer-local-condition
ELISP> (setq x (lambda () "hello")) (closure (t) nil "hello") ELISP> (consp x) t ELISP> (functionp x) t ELISP> (eval x) Debugger entered--Lisp error: (void-function closure)
This commit checks for functions first, to avoid evaling closures inadvertently. At the moment, yasnippet is broken if you have, e.g.
(setq-default yas-buffer-local-condition yas-not-string-or-comment-condition)
Duh, of course, thanks. Even for good 'old (lambda ...) values the patch is needed (it wouldn't signal an error, but it would still not return the intended value).
(lambda ...)
The change in introduced in 1d0966a checks if
yas-buffer-local-condition
is a cons before a function but lambdas in lexical environments get converted to closures which are also conses.This commit checks for functions first, to avoid evaling closures inadvertently. At the moment, yasnippet is broken if you have, e.g.