From 368ff7ba090a663e77cb90af2d89206af9201644 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 10 Mar 2011 10:26:37 +0100 Subject: [PATCH 2/2] * org-html.el: Bugfix: define email and creator-info before using them. * org-html.el (org-export-as-html): Bugfix: define email and creator-info before using them. Thanks to Jason Dunsmore for catching this. --- lisp/org-html.el | 37 ++++++++++++++++++------------------- 1 files changed, 18 insertions(+), 19 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index d5ea1a3..1661085 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1704,7 +1704,15 @@ lang=\"%s\" xml:lang=\"%s\"> ;; Export html postamble (unless body-only - (let ((html-post (plist-get opt-plist :html-postamble))) + (let ((html-post (plist-get opt-plist :html-postamble)) + ((email + (mapconcat (lambda(e) + (format "%s" e e)) + (split-string email ",+ *") + ", ")) + (creator-info + (concat "Org version " org-version " with Emacs version " + (number-to-string emacs-major-version))))) (when (plist-get opt-plist :html-postamble) (cond ((stringp html-post) (insert "
\n") @@ -1717,25 +1725,16 @@ lang=\"%s\" xml:lang=\"%s\"> (funcall html-post opt-plist)) ((eq html-post 'auto) ;; fall back on default postamble - (let - ((email - (mapconcat (lambda(e) - (format "%s" e e)) - (split-string email ",+ *") - ", ")) - (creator-info - (concat "Org version " org-version " with Emacs version " - (number-to-string emacs-major-version)))) - (insert "
\n") - (when (and (plist-get opt-plist :author-info) author) + (insert "
\n") + (when (and (plist-get opt-plist :author-info) author) (insert "

" (nth 1 lang-words) ": " author "

\n")) - (when (and (plist-get opt-plist :email-info) email) - (insert "

<" email ">

\n")) - (when (plist-get opt-plist :creator-info) - (insert "

" - (concat "Org version " org-version " with Emacs version " - (number-to-string emacs-major-version) "

\n"))) - (insert html-validation-link "\n
"))) + (when (and (plist-get opt-plist :email-info) email) + (insert "

<" email ">

\n")) + (when (plist-get opt-plist :creator-info) + (insert "

" + (concat "Org version " org-version " with Emacs version " + (number-to-string emacs-major-version) "

\n"))) + (insert html-validation-link "\n
")) (t (insert "
\n") (insert (format-spec -- 1.7.4.1