diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-05-04 00:24:36 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-05-04 00:24:36 +0200 |
commit | 064caac937acdf3f7993ff459feffaba7bef7d7d (patch) | |
tree | 65f24426cd5f1edaf9ffd1056d19d6606cf53dc8 | |
parent | 631c4b703e78e011481b5d045e0bb552a6143e00 (diff) | |
download | org-mode-064caac937acdf3f7993ff459feffaba7bef7d7d.tar.gz |
ox-html: Make use of :html-preamble/postamble-format
* lisp/ox-html.el (org-html--build-pre/postamble): Use
`:html-preamble-format' and `:html-postamble-format' instead of
relying on the global variables.
Reported-by: Brady Trainor <mail@bradyt.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00073.html>
-rw-r--r-- | lisp/ox-html.el | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 39f7d83..ec80e83 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1981,19 +1981,15 @@ communication channel." (format "<p class=\"creator\">%s</p>\n" creator)) (format "<p class=\"validation\">%s</p>\n" validation-link)))) - (t (format-spec - (or (cadr (assoc-string - (plist-get info :language) - (eval (intern - (format "org-html-%s-format" type))) - t)) - (cadr - (assoc-string - "en" - (eval - (intern (format "org-html-%s-format" type))) - t))) - spec)))))) + (t + (let ((formats (plist-get info (if (eq type 'preamble) + :html-preamble-format + :html-postamble-format))) + (language (plist-get info :language))) + (format-spec + (cadr (or (assoc-string language formats t) + (assoc-string "en" formats t))) + spec))))))) (let ((div (assq type (plist-get info :html-divs)))) (when (org-string-nw-p section-contents) (concat |