mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
add a reference to snippet in group.
This commit is contained in:
parent
c7c4ba4dc8
commit
b3666ea3ee
@ -86,12 +86,13 @@ current column if this variable is non-`nil'.")
|
|||||||
(groups nil)
|
(groups nil)
|
||||||
(exit-marker nil)
|
(exit-marker nil)
|
||||||
(id (yas/snippet-next-id) :read-only t))
|
(id (yas/snippet-next-id) :read-only t))
|
||||||
(defstruct (yas/group (:constructor yas/make-group (primary-field)))
|
(defstruct (yas/group (:constructor yas/make-group (primary-field snippet)))
|
||||||
"A group contains a list of field with the same number."
|
"A group contains a list of field with the same number."
|
||||||
primary-field
|
primary-field
|
||||||
(fields (list primary-field))
|
(fields (list primary-field))
|
||||||
(next nil)
|
(next nil)
|
||||||
(prev nil))
|
(prev nil)
|
||||||
|
snippet)
|
||||||
(defstruct (yas/field (:constructor yas/make-field (overlay number value)))
|
(defstruct (yas/field (:constructor yas/make-field (overlay number value)))
|
||||||
"A field in a snippet."
|
"A field in a snippet."
|
||||||
overlay
|
overlay
|
||||||
@ -108,7 +109,7 @@ current column if this variable is non-`nil'.")
|
|||||||
(yas/group-number group))))))
|
(yas/group-number group))))))
|
||||||
(if group
|
(if group
|
||||||
(yas/group-add-field group field)
|
(yas/group-add-field group field)
|
||||||
(push (yas/make-group field)
|
(push (yas/make-group field snippet)
|
||||||
(yas/snippet-groups snippet)))))
|
(yas/snippet-groups snippet)))))
|
||||||
|
|
||||||
(defun yas/group-value (group)
|
(defun yas/group-value (group)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user