Merge pull request #1184 from martenlienen/local-condition-closure

Allow closures in yas-buffer-local-condition
This commit is contained in:
monnier 2024-01-22 08:23:30 -05:00 committed by GitHub
commit 5af84cdb94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)