[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 140c415 52/60: Respect y-b-l-cond from binding triggered s
From: |
João Távora |
Subject: |
[elpa] master 140c415 52/60: Respect y-b-l-cond from binding triggered snippets |
Date: |
Thu, 21 Jan 2016 22:36:07 +0000 |
branch: master
commit 140c415505b7f2673fe58fdbf033213b089c22b3
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Respect y-b-l-cond from binding triggered snippets
The default value for `yas-buffer-local-condition' was only effective
for `yas-expand-from-trigger-key' command, so it didn't have any effect
when triggering snippets from a key binding (or if using the
`yas-expand' alias).
* yasnippet.el (yas-buffer-local-condition): Check if `this-command' is
`yas-expand' or `yas-expand-from-keymap' too.
Fixes #305, close #638
---
yasnippet.el | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index 592742f..5d803c8 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -462,10 +462,10 @@ Attention: These hooks are not run when exiting
nested/stacked snippet expansion
"Hooks to run just before expanding a snippet.")
(defvar yas-buffer-local-condition
- '(if (and (or (fourth (syntax-ppss))
- (fifth (syntax-ppss)))
- this-command
- (eq this-command 'yas-expand-from-trigger-key))
+ '(if (and (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)
"Snippet expanding condition.
- [elpa] master 3aa7cb2 40/60: M-x delete-trailing-whitespace, (continued)
- [elpa] master 3aa7cb2 40/60: M-x delete-trailing-whitespace, João Távora, 2016/01/21
- [elpa] master d78181a 46/60: Remove yas--inhibit-overlay-hooks macro., João Távora, 2016/01/21
- [elpa] master 17fe790 51/60: Fix #515; only clear field on self-insert, João Távora, 2016/01/21
- [elpa] master 67a45a6 48/60: * README.mdown: Add link to textmate-to-yas.el., João Távora, 2016/01/21
- [elpa] master c80fbf2 49/60: Cleanup yas--on-field-overlay-modification, João Távora, 2016/01/21
- [elpa] master 444c882 47/60: * README.mdown: update melpa URL., João Távora, 2016/01/21
- [elpa] master 61261c9 53/60: Fix #576; don't override yas-prompt-functions, João Távora, 2016/01/21
- [elpa] master a2c5292 55/60: Bless Noam Postavsky as the new official maintainer, João Távora, 2016/01/21
- [elpa] master cd05da6 36/60: Activate extra and major modes first, João Távora, 2016/01/21
- [elpa] master 3cd64b7 45/60: yasnippet.el (yas--called-interactively-p): Remove., João Távora, 2016/01/21
- [elpa] master 140c415 52/60: Respect y-b-l-cond from binding triggered snippets,
João Távora <=
- [elpa] master 71f0142 50/60: Improve test simulatulation of self-insert, João Távora, 2016/01/21
- [elpa] master e6fff09 54/60: Don't choose ido prompting based on Emacs version, João Távora, 2016/01/21
- [elpa] master af90528 56/60: Fix debugging code for newer Emacsen, João Távora, 2016/01/21
- [elpa] master 100d8d1 57/60: Fix bug reporting examples., João Távora, 2016/01/21
- [elpa] master 46256db 58/60: Fix #648; create ~/.emacs.d/snippets automatically, João Távora, 2016/01/21
- [elpa] master 1a98c38 59/60: Fix silly mistake in previous commit, João Távora, 2016/01/21
- [elpa] master 5817fe1 60/60: Update packages/yasnippet by subtree-merging from its external upstream, João Távora, 2016/01/21