This commit is contained in:
Joao Tavora 2012-02-22 13:32:56 +00:00
parent c43c55b573
commit c9f35eda2e

12
yasnippet.el Executable file → Normal file
View File

@ -3016,16 +3016,14 @@ Also create some protection overlays"
`(let ((yas/inhibit-overlay-hooks t)) `(let ((yas/inhibit-overlay-hooks t))
(progn ,@body))) (progn ,@body)))
(defvar yas/snippet-beg nil "Beginning position of the last snippet commited.")
(defvar yas/snippet-end nil "End position of the last snippet commited.")
(defun yas/commit-snippet (snippet) (defun yas/commit-snippet (snippet)
"Commit SNIPPET, but leave point as it is. This renders the "Commit SNIPPET, but leave point as it is. This renders the
snippet as ordinary text. snippet as ordinary text."
Return a buffer position where the point should be placed if (let ((control-overlay (yas/snippet-control-overlay snippet)))
exiting the snippet."
(let ((control-overlay (yas/snippet-control-overlay snippet))
yas/snippet-beg
yas/snippet-end)
;; ;;
;; Save the end of the moribund snippet in case we need to revive it ;; Save the end of the moribund snippet in case we need to revive it
;; its original expansion. ;; its original expansion.