         (insert rpl)
         (when (re-search-backward "\\?" start t) (delete-char 1))))
 
-    (defun modi/org-template-expand (str &optional lang)
+    (defun modi/org-template-expand (str &optional arg)
       "Expand Org template based on STR.
 
 STR is always prefixed with \"<\".  The string following that
 \"<\" must match with the `car' of one of the elements in
 `org-easy-template-alist' (examples: \"<e\", \"<s\").
 
-If no region is selected, this function behaves like
-`org-try-structure-completion' (See (org) Easy templates).  If a
-region is selected, the selected text is wrapped with that org
-template.
-
-If the \"#+BEGIN_SRC\" block is inserted and LANG is a string,
-that source block is annotated with that LANG.  Instead, if LANG
-is nil, point is returned to the end of the \"#+BEGIN_SRC\" line
-after the template insertion."
+If no region is selected, this function simply runs
+`org-try-structure-completion' and does the template expansion
+based on `org-easy-template-alist'.  If a region is selected, the
+selected text is wrapped with that Org template.
+
+If the \"#+BEGIN_SRC\" block is inserted and ARG is a string
+representing the source language, that source block is annotated
+with that ARG.  If ARG is nil, point is returned to the end of
+the \"#+BEGIN_SRC\" line after the template insertion.
+
+If the \"#+BEGIN_EXPORT\" block is inserted and ARG is a string
+representing the export backend, that export block is annotated
+with that ARG.  If ARG is nil, point is returned to the end of
+the \"#+BEGIN_EXPORT\" line after the template insertion."
       (let* ((is-region? (use-region-p))
              (beg (if is-region?
                       (region-beginning)

             ;; being a marker).
             (end (when is-region?
                    (copy-marker (region-end) t)))
             content post-src column)

        (goto-char beg)


        ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM")
        ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER")
        ("C" "#+BEGIN_COMMENT\n?\n#+END_COMMENT")
        ("X" "#+BEGIN_EXPORT ?\n\n#+END_EXPORT")
        ("l" "#+BEGIN_EXPORT latex\n?\n#+END_EXPORT")
        ("L" "#+LaTeX: ")
        ("h" "#+BEGIN_EXPORT html\n?\n#+END_EXPORT")
