[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 596e6b2 158/177: Closes #537: Be lenient to extensions ope
From: |
João Távora |
Subject: |
[elpa] master 596e6b2 158/177: Closes #537: Be lenient to extensions operating on snippet fields |
Date: |
Sat, 28 Mar 2015 15:41:38 +0000 |
branch: master
commit 596e6b2640ab80c8823a749c4da71af5dd2e6fe0
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Closes #537: Be lenient to extensions operating on snippet fields
* yasnippet.el (yas--on-protection-overlay-modification): Commit the
snippets being destroyed instead of signalling a protection violation.
---
yasnippet.el | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index cb1d041..c93d886 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -3496,8 +3496,14 @@ The error should be ignored in `debug-ignored-errors'"
(unless yas--inhibit-overlay-hooks
(cond ((not (or after?
(yas--undo-in-progress)))
- (setq yas--protection-violation (point))
- (error "Exit the snippet first!")))))
+ (cond (t
+ (let ((snippets (yas--snippets-at-point)))
+ (yas--message 3 "Comitting snippets. Action would destroy
a protection overlay.")
+ (cl-loop for snippet in snippets
+ do (yas--commit-snippet snippet))))
+ (nil
+ (setq yas--protection-violation (point))
+ (error "Exit the snippet first!")))))))
(add-to-list 'debug-ignored-errors "^Exit the snippet first!$")
- [elpa] master 8e9bf3c 147/177: Merge pull request #518 from rnkn/master, (continued)
- [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, 2015/03/28
- [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 <=
- [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
- [elpa] master b62bdf3 163/177: Closes #546: backport `yas-initialize' and provide `yas/initialize', João Távora, 2015/03/28
- [elpa] master e161fc0 162/177: Merge pull request #542 from tarsius/nosearch, João Távora, 2015/03/28
- [elpa] master 07734a1 165/177: Clarify what happens with yas-new-snippet., João Távora, 2015/03/28