diff --git a/snippets/html-mode/div b/snippets/html-mode/div
new file mode 100644
index 0000000..0ecfde3
--- /dev/null
+++ b/snippets/html-mode/div
@@ -0,0 +1,3 @@
+#name :
...
+# --
+$0
\ No newline at end of file
diff --git a/snippets/html-mode/doctype b/snippets/html-mode/doctype
new file mode 100644
index 0000000..5e678d5
--- /dev/null
+++ b/snippets/html-mode/doctype
@@ -0,0 +1,3 @@
+#name : Doctype HTML 4.01 Strict
+# --
+
\ No newline at end of file
diff --git a/snippets/html-mode/doctype.xhml1 b/snippets/html-mode/doctype.xhml1
new file mode 100644
index 0000000..c5cfb6f
--- /dev/null
+++ b/snippets/html-mode/doctype.xhml1
@@ -0,0 +1,3 @@
+#name : DocType XHTML 1.0 frameset
+# --
+
\ No newline at end of file
diff --git a/snippets/html-mode/doctype.xhtml1_1 b/snippets/html-mode/doctype.xhtml1_1
new file mode 100644
index 0000000..72076c0
--- /dev/null
+++ b/snippets/html-mode/doctype.xhtml1_1
@@ -0,0 +1,3 @@
+#name : DocType XHTML 1.1
+# --
+
\ No newline at end of file
diff --git a/snippets/html-mode/doctype.xhtml1_strict b/snippets/html-mode/doctype.xhtml1_strict
new file mode 100644
index 0000000..176616b
--- /dev/null
+++ b/snippets/html-mode/doctype.xhtml1_strict
@@ -0,0 +1,3 @@
+#name : DocType XHTML 1.0 Strict
+# --
+
\ No newline at end of file
diff --git a/snippets/html-mode/doctype.xhtml1_transitional b/snippets/html-mode/doctype.xhtml1_transitional
new file mode 100644
index 0000000..d6b6bae
--- /dev/null
+++ b/snippets/html-mode/doctype.xhtml1_transitional
@@ -0,0 +1,3 @@
+#name : DocType XHTML 1.0 Transitional
+# --
+
\ No newline at end of file
diff --git a/yasnippet.el b/yasnippet.el
index 3744718..0f389f7 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -418,6 +418,8 @@ will be deleted before inserting template."
(widen)
(delete-char length)
+ (setq buffer-undo-list original-undo-list)
+
;; Step 14: place the cursor at a proper place
(let ((groups (yas/snippet-groups snippet))
(exit-marker (yas/snippet-exit-marker snippet)))
@@ -427,9 +429,7 @@ will be deleted before inserting template."
(yas/group-primary-field
(car groups)))))
;; no need to call exit-snippet, since no overlay created.
- (goto-char exit-marker)))
-
- (setq buffer-undo-list original-undo-list)))))
+ (yas/exit-snippet snippet)))))))
(defun yas/current-snippet-overlay (&optional point)
"Get the most proper overlay which is belongs to a snippet."
@@ -608,7 +608,7 @@ otherwise, nil returned."
(let ((templates (gethash key (yas/current-snippet-table))))
(if templates
(let ((template (if (null (cdr templates)) ; only 1 template
- (cdar templates)
+ (yas/template-content (cdar templates))
(yas/popup-for-template templates))))
(when template
(yas/expand-snippet start end template)))