From d9f966a220393339fd99b26b2bed8c7f6d79d226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sun, 16 Dec 2012 14:36:14 +0000 Subject: [PATCH] Closes #347: can't expect THIS-COMMAND to have valid value in YAS-BUFFER-LOCAL-CONDITION --- yasnippet.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yasnippet.el b/yasnippet.el index 42227f1..c33c3c6 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -415,7 +415,8 @@ Attention: These hooks are not run when exiting nested/stacked snippet expansion (defvar yas-buffer-local-condition '(if (and (or (fourth (syntax-ppss)) (fifth (syntax-ppss))) - (eq (symbol-function this-command) 'yas-expand-from-trigger-key)) + this-command + (eq this-command 'yas-expand-from-trigger-key)) '(require-snippet-condition . force-in-comment) t) "Snippet expanding condition.