diff --git a/doc/auctex.texi b/doc/auctex.texi
index fbf37fb..d6f76d9 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -712,7 +712,8 @@ prompt you for further specifications.
 
 If the optional argument @var{arg} is not-nil (i.e. you have given a
 prefix argument), the current environment is modified and no new
-environment is inserted.
+environment is inserted, unless the chosen environment is
+@samp{document}---see below.
 @end deffn
 
 As a default selection, @AUCTeX{} will suggest the environment last
@@ -726,9 +727,23 @@ first time.
 
 If the document is empty, or the cursor is placed at the top of the
 document, @AUCTeX{} will default to insert a `document' environment.
+You may insert a document template calling @code{LaTeX-environment} with
+a prefix argument.
+
+@defopt LaTeX-document-template-alist
+This is the alist of document templates which can be inserted when
+@code{LaTeX-environment} is called with a prefix argument and you chose
+@samp{document} environment.
+
+For each element, the key is the template name, the value is a
+sequence of two strings, the former is the string that should be
+inserted before point, the latter is the string that should be
+inserted after point.
+@end defopt
 
-Most of these are described further in the following sections, and you
-may easily specify more.  @xref{Customizing Environments}.
+Most of the known environments are described further in the following
+sections, and you may easily specify more.  @xref{Customizing
+Environments}.
 
 @menu
 * Equations::                   Equations
diff --git a/latex.el b/latex.el
index c8aa77d..9bde215 100644
--- a/latex.el
+++ b/latex.el
@@ -511,9 +511,49 @@ variable overrides `LaTeX-default-environment'.")
 ;; means it is usually let-bound for such operations.
 (defvar LaTeX-current-environment nil)
 
+(defcustom LaTeX-document-template-alist
+  '(("Article" "\\documentclass{article}
+\\usepackage[T1]{fontenc}
+\\usepackage[utf8]{inputenc}
+
+\\begin{document}
+" "
+\\end{document}")
+    ("Book" "\\documentclass{book}
+\\usepackage[T1]{fontenc}
+\\usepackage[utf8]{inputenc}
+
+\\begin{document}
+" "
+\\end{document}")
+    ("Beamer" "\\documentclass{beamer}
+\\usepackage[T1]{fontenc}
+\\usepackage[utf8]{inputenc}
+
+\\begin{document}
+
+\\begin{slide}
+  \\frametitle{" "}
+\\end{slide}
+\\end{document}"))
+  "Alist of document templates which can be inserted when
+`LaTeX-environment' is called with `\\[universal-argument]' and
+the chosen environment is \"document\".
+
+For each element, the key is the template name, the value is a
+sequence of two strings, the former is the string that should be
+inserted before point, the latter is the string that should be
+inserted after point."
+  :group 'LaTeX-environment
+  :type '(alist :key-type (string :tag "Template name")
+		:value-type (group (string :tag "Insert before point")
+				   (string :tag "Insert after point"))))
+
 (defun LaTeX-environment (arg)
   "Make LaTeX environment (\\begin{...}-\\end{...} pair).
-With optional ARG, modify current environment.
+With optional ARG, modify current environment, unless the chosen
+environment is \"document\", in that case insert a document
+template from `LaTeX-document-template-alist'.
 
 It may be customized with the following variables:
 
@@ -549,7 +589,21 @@ It may be customized with the following variables:
 	  (LaTeX-add-environments (list environment)))
 
       (if arg
-	  (LaTeX-modify-environment environment)
+	  (if (string-equal environment "document")
+	      (let* ((completion-ignore-case t)
+		     (template (completing-read
+				"Document template name: "
+				(TeX-delete-duplicate-strings
+				 (mapcar (lambda (elt) (car elt))
+					 LaTeX-document-template-alist)))))
+		(insert
+		 (car (cdr (assoc template LaTeX-document-template-alist))))
+		(save-excursion
+		  (insert (car (cdr (cdr (assoc
+					  template
+					  LaTeX-document-template-alist))))))
+		(indent-according-to-mode))
+	    (LaTeX-modify-environment environment))
 	(LaTeX-environment-menu environment)))))
 
 (defun LaTeX-environment-menu (environment)
