mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
yas/exit-snippet
called interactively exits the most recently inserted snippet (issue #196)
This commit is contained in:
parent
e53c41d726
commit
11fb69f0c0
11
yasnippet.el
11
yasnippet.el
@ -2994,11 +2994,12 @@ Also create some protection overlays"
|
|||||||
|
|
||||||
(defun yas/exit-snippet (snippet)
|
(defun yas/exit-snippet (snippet)
|
||||||
"Goto exit-marker of SNIPPET."
|
"Goto exit-marker of SNIPPET."
|
||||||
(interactive)
|
(interactive (list (first (yas/snippets-at-point))))
|
||||||
(setf (yas/snippet-force-exit snippet) t)
|
(when snippet
|
||||||
(goto-char (if (yas/snippet-exit snippet)
|
(setf (yas/snippet-force-exit snippet) t)
|
||||||
(yas/exit-marker (yas/snippet-exit snippet))
|
(goto-char (if (yas/snippet-exit snippet)
|
||||||
(overlay-end (yas/snippet-control-overlay snippet)))))
|
(yas/exit-marker (yas/snippet-exit snippet))
|
||||||
|
(overlay-end (yas/snippet-control-overlay snippet))))))
|
||||||
|
|
||||||
(defun yas/exit-all-snippets ()
|
(defun yas/exit-all-snippets ()
|
||||||
"Exit all snippets."
|
"Exit all snippets."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user