mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00

Instead of making yas-expand and yas-expand-from-keymap search for the command that would have been called, use a conditional keybinding so the Emacs' builtin keybinding lookup code will do the searching instead. * doc/faq.org: Remove section about old method binding method. Update example to use new method. * doc/snippet-expansion.org (Trigger key): Update explanation for new method. * yasnippet.el (yas-fallback-behavior): Mark obsolete. (yas--maybe-expand-key-filter): New function. (yas-maybe-expand): New conditional binding. (yas-minor-mode-map): Bind it to TAB and <tab>. (yas--maybe-expand-from-keymap-filter): New function, extracted from `yas-expand-from-keymap'. (yas-maybe-expand-from-keymap): New conditional binding. * yasnippet-tests.el (yas--key-binding): New function, like `key-binding' but overrides `this-command-keys-vector'. (snippet-load-uuid): Use it. (test-yas-tab-binding, test-yas-in-org): Insert snippet key before testing binding.