fix the bug on expanding a snippet without

This commit is contained in:
Zhang Chiyuan 2008-10-20 21:07:18 +00:00
parent 331812fefb
commit d93bea8204

View File

@ -803,10 +803,12 @@ will be deleted before inserting template."
;; Step 16: Do necessary indenting
(save-excursion
(goto-char (overlay-start (yas/snippet-overlay snippet)))
(let ((ovst (overlay-start (yas/snippet-overlay snippet))))
(when ovst
(goto-char ovst)
(while (re-search-forward "$>" nil t)
(replace-match "")
(indent-according-to-mode)))))))
(indent-according-to-mode)))))))))
(defun yas/current-snippet-overlay (&optional point)
"Get the most proper overlay which is belongs to a snippet."