Fix #587; set `this-command' on fallback.

`this-original-command' is supposed to be for the command that
we're *not* executing because of key remapping, therefore it doesn't
make sense to set it to the command we're about to execute.

* yasnippet.el (yas--fallback): Set `this-command'.
This commit is contained in:
Noam Postavsky 2015-12-08 18:19:02 -05:00
parent 2100b89eb8
commit 6c46878882

View File

@ -2233,7 +2233,7 @@ Common gateway for `yas-expand-from-trigger-key' and
(beyond-yasnippet (yas--keybinding-beyond-yasnippet))) (beyond-yasnippet (yas--keybinding-beyond-yasnippet)))
(yas--message 4 "Falling back to %s" beyond-yasnippet) (yas--message 4 "Falling back to %s" beyond-yasnippet)
(assert (or (null beyond-yasnippet) (commandp beyond-yasnippet))) (assert (or (null beyond-yasnippet) (commandp beyond-yasnippet)))
(setq this-original-command beyond-yasnippet) (setq this-command beyond-yasnippet)
(when beyond-yasnippet (when beyond-yasnippet
(call-interactively beyond-yasnippet)))) (call-interactively beyond-yasnippet))))
((and (listp yas-fallback-behavior) ((and (listp yas-fallback-behavior)