[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 70151f4 152/177: Closes #525, closes #526: Prevent some ke
From: |
João Távora |
Subject: |
[elpa] master 70151f4 152/177: Closes #525, closes #526: Prevent some keybinding fallback loops |
Date: |
Sat, 28 Mar 2015 15:41:36 +0000 |
branch: master
commit 70151f4f1e56fdf18d9e2b9dff9dec7a769e0a05
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Closes #525, closes #526: Prevent some keybinding fallback loops
* yasnippet.el (yas--keybinding-beyond-yasnippet): Add docstring.
(yas--fallback): Also let-bind `yas-minor-mode' to nil when
falling back.
---
yasnippet.el | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index 75f0ad4..a64230b 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -2254,6 +2254,12 @@ Common gateway for `yas-expand-from-trigger-key' and
"outside of the `yas-minor-mode-map'.")))
((eq yas-fallback-behavior 'call-other-command)
(let* ((yas-fallback-behavior 'yas--fallback)
+ ;; Also bind `yas-minor-mode' to prevent fallback
+ ;; loops when other extensions use mechanisms similar
+ ;; to `yas--keybinding-beyond-yasnippet'. (github #525
+ ;; and #526)
+ ;;
+ (yas-minor-mode nil)
(beyond-yasnippet (yas--keybinding-beyond-yasnippet)))
(yas--message 4 "Falling back to %s" beyond-yasnippet)
(assert (or (null beyond-yasnippet) (commandp beyond-yasnippet)))
@@ -2263,7 +2269,8 @@ Common gateway for `yas-expand-from-trigger-key' and
((and (listp yas-fallback-behavior)
(cdr yas-fallback-behavior)
(eq 'apply (car yas-fallback-behavior)))
- (let ((yas-fallback-behavior 'yas--fallback))
+ (let ((yas-fallback-behavior 'yas--fallback)
+ (yas-minor-mode nil))
(if (cddr yas-fallback-behavior)
(apply (cadr yas-fallback-behavior)
(cddr yas-fallback-behavior))
@@ -2275,7 +2282,7 @@ Common gateway for `yas-expand-from-trigger-key' and
nil)))
(defun yas--keybinding-beyond-yasnippet ()
- "Return the ??"
+ "Get current keys's binding as if YASsnippet didn't exist."
(let* ((yas-minor-mode nil)
(yas--direct-keymaps nil)
(keys (this-single-command-keys)))
- [elpa] master 70de821 143/177: enforce use of spaces for indentation, (continued)
- [elpa] master 70de821 143/177: enforce use of spaces for indentation, João Távora, 2015/03/28
- [elpa] master 41cb5f5 145/177: Update snippets submodule, João Távora, 2015/03/28
- [elpa] master cc64ff6 144/177: Merge pull request #514 from tarsius/master, João Távora, 2015/03/28
- [elpa] master 8e9bf3c 147/177: Merge pull request #518 from rnkn/master, João Távora, 2015/03/28
- [elpa] master 6f7c915 146/177: Compatibility with custom-unlispify-remove-prefixes, João Távora, 2015/03/28
- [elpa] master 783cc33 148/177: Use cl-incf instead of cl, João Távora, 2015/03/28
- [elpa] master 08b044e 149/177: Merge pull request #519 from syohex/use-cl-macro, João Távora, 2015/03/28
- [elpa] master e731451 150/177: Signal an error on recursive yas--fallback calls, João Távora, 2015/03/28
- [elpa] master 6877bc6 151/177: Merge pull request #524 from npostavs/fallback-loop, João Távora, 2015/03/28
- [elpa] master 37df653 142/177: yasnippet-debug.el: quiet byte-compiler, João Távora, 2015/03/28
- [elpa] master 70151f4 152/177: Closes #525, closes #526: Prevent some keybinding fallback loops,
João Távora <=
- [elpa] master 6053db0 153/177: Closes #527: Unbreak case where yas-fallback-behaviour is a list, João Távora, 2015/03/28
- [elpa] master b22961a 155/177: Update README.mdown, João Távora, 2015/03/28
- [elpa] master 596e6b2 158/177: Closes #537: Be lenient to extensions operating on snippet fields, João Távora, 2015/03/28
- [elpa] master 1c97671 157/177: Closes #536: Fix navigation to zero-length fields at snippet end, João Távora, 2015/03/28
- [elpa] master e2b876b 154/177: Tweak README.mdown to simplify bug reporting paragraph, João Távora, 2015/03/28
- [elpa] master 51d4ed1 156/177: Update snippets submodule, João Távora, 2015/03/28
- [elpa] master 175e0a3 159/177: Clean up previous change, João Távora, 2015/03/28
- [elpa] master 50ca8d3 160/177: Update README.mdown, João Távora, 2015/03/28
- [elpa] master bb6bbad 161/177: Add file doc/.nosearch, João Távora, 2015/03/28
- [elpa] master 9709dbd 164/177: Add autoload cookies, João Távora, 2015/03/28