Don't check this-command in yas-not-string-or-comment-condition

Since we now check conditions in conditional keybindings, it can be
evaluated before 'this-command' has been assigned.
* yasnippet.el (yas-not-string-or-comment-condition): Remove check of
'this-command'.
This commit is contained in:
Noam Postavsky 2019-04-14 13:59:39 -04:00
parent 6a3619b4f2
commit 7612bc1b70

View File

@ -481,10 +481,8 @@ Attention: These hooks are not run when exiting nested/stacked snippet expansion
"Hooks to run just before expanding a snippet.")
(defconst yas-not-string-or-comment-condition
'(if (and (let ((ppss (syntax-ppss)))
'(if (let ((ppss (syntax-ppss)))
(or (nth 3 ppss) (nth 4 ppss)))
(memq this-command '(yas-expand yas-expand-from-trigger-key
yas-expand-from-keymap)))
'(require-snippet-condition . force-in-comment)
t)
"Disables snippet expansion in strings and comments.