From 9228fd983bb9e71d44d406433a46495b22640801 Mon Sep 17 00:00:00 2001 From: Marten Lienen Date: Mon, 22 Jan 2024 11:08:44 +0100 Subject: [PATCH] * yasnippel.el (yas-buffer-local-condition): Check functionp before consp to allow closures --- yasnippet.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yasnippet.el b/yasnippet.el index 54616d4..d6e5d69 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -1366,10 +1366,10 @@ conditions to filter out potential expansions." 'always (let ((local-condition (or (cond - ((consp yas-buffer-local-condition) - (yas--funcall-condition #'eval yas-buffer-local-condition t)) ((functionp yas-buffer-local-condition) - (yas--funcall-condition yas-buffer-local-condition))) + (yas--funcall-condition yas-buffer-local-condition)) + ((consp yas-buffer-local-condition) + (yas--funcall-condition #'eval yas-buffer-local-condition t))) yas-buffer-local-condition))) (when local-condition (if (eq local-condition t)