From c43c55b573ac287b58f57c994b30fecc8ee58bf2 Mon Sep 17 00:00:00 2001 From: Joao Tavora Date: Thu, 16 Feb 2012 10:17:18 +0000 Subject: [PATCH] Fix issue reported in http://stackoverflow.com/questions/9298866/emacs-yasnippet-insert-snippet-on-keystroke --- yasnippet.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 yasnippet.el diff --git a/yasnippet.el b/yasnippet.el old mode 100644 new mode 100755 index 8456b75..134c2a7 --- a/yasnippet.el +++ b/yasnippet.el @@ -2133,7 +2133,10 @@ object satisfying `yas/field-p' to restrict the expansion to." If expansion fails, execute the previous binding for this key" (interactive) (setq yas/condition-cache-timestamp (current-time)) - (let* ((vec (this-command-keys-vector)) + (let* ((yas/prefix current-prefix-arg) + (vec (subseq (this-command-keys-vector) (if current-prefix-arg + universal-argument-num-events + 0))) (templates (mapcan #'(lambda (table) (yas/fetch table vec)) (yas/get-snippet-tables))))