mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
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.
This commit is contained in:
parent
1c97671c6e
commit
596e6b2640
@ -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)))
|
||||
(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!")))))
|
||||
(error "Exit the snippet first!")))))))
|
||||
|
||||
(add-to-list 'debug-ignored-errors "^Exit the snippet first!$")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user