[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a87ec54 12/36: yasnippet.el (yas-next-field-will-exit-p):
From: |
Noam Postavsky |
Subject: |
[elpa] master a87ec54 12/36: yasnippet.el (yas-next-field-will-exit-p): New function. |
Date: |
Sat, 11 Jun 2016 19:21:10 +0000 (UTC) |
branch: master
commit a87ec549a6a69ff7ef02d183585b202e6bb3dc43
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
yasnippet.el (yas-next-field-will-exit-p): New function.
---
yasnippet.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/yasnippet.el b/yasnippet.el
index a4e9b37..4c1efcd 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -3063,6 +3063,13 @@ Otherwise delegate to `yas-next-field'."
(yas-next-field))))
(yas-next-field)))
+(defun yas-next-field-will-exit-p (&optional arg)
+ "Return non-nil if (yas-next-field ARG) would exit the current snippet."
+ (let ((snippet (car (yas--snippets-at-point)))
+ (active (overlay-get yas--active-field-overlay 'yas--field)))
+ (when snippet
+ (not (yas--find-next-field arg snippet active)))))
+
(defun yas--find-next-field (n snippet active)
"Return the Nth field after the ACTIVE one in SNIPPET."
(let ((live-fields (cl-remove-if
- [elpa] master updated (ee4cf1e -> 438f5db), Noam Postavsky, 2016/06/11
- [elpa] master 3e67b1b 02/36: yasnippet.el (snippet-mode): Add autoload cookie., Noam Postavsky, 2016/06/11
- [elpa] master c0032e6 08/36: chmod -x doc/yas-doc-helper.el, Noam Postavsky, 2016/06/11
- [elpa] master 14f830a 13/36: Test expansion in an empty buffer, Noam Postavsky, 2016/06/11
- [elpa] master a87ec54 12/36: yasnippet.el (yas-next-field-will-exit-p): New function.,
Noam Postavsky <=
- [elpa] master 7799aa9 09/36: Document .yas-setup.el, Noam Postavsky, 2016/06/11
- [elpa] master 4f2aa15 05/36: Only kill snippets for text length change, Noam Postavsky, 2016/06/11
- [elpa] master 8771082 03/36: Don't add useless kill ring entries, Noam Postavsky, 2016/06/11
- [elpa] master cc14db3 11/36: Refactor yas-next-field a bit, Noam Postavsky, 2016/06/11
- [elpa] master db4cd31 20/36: Delete active region for trigger key expansion, Noam Postavsky, 2016/06/11
- [elpa] master e37ce9e 18/36: Disable region wrapping for trigger key expansion, Noam Postavsky, 2016/06/11
- [elpa] master 6180cc4 28/36: Fix field transform application in yas-next-field, Noam Postavsky, 2016/06/11
- [elpa] master 146b161 25/36: Don't indent empty lines in snippet expansion, Noam Postavsky, 2016/06/11
- [elpa] master e9406f5 26/36: Document $> and fix escaping, Noam Postavsky, 2016/06/11
- [elpa] master 6f97316 27/36: Fix outdated and misformatted docs, Noam Postavsky, 2016/06/11