Respect `yas-buffer-local-condition` for snippets with `# binding:` directives #305

Closed
zw963 opened this Issue Sep 18, 2012 · 1 comment

2 participants

@zw963

When I in a string active a binding snippet, e.g. this binding key only a char,
Suppose I binding a snippet with binding: a (Not key: a)
I in a string press a, will auto active snippet.
But if a key, it not.
I thought about if yas-buffer-local-condition not add relation to binding condition
test code ??

@joaotavora
Owner

Renaming this.

@joaotavora joaotavora closed this Aug 11, 2014
@joaotavora joaotavora changed the title from [Function quest] binding snippet is not limited by force-in-comment. to Respect `yas-buffer-local-condition` for snippets with `# binding:` directives Aug 11, 2014
@joaotavora joaotavora reopened this Aug 11, 2014
@npostavs npostavs added a commit that closed this issue Dec 27, 2015
@npostavs npostavs 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
140c415
@npostavs npostavs closed this in 140c415 Dec 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment