From 1feac494761ed5997a652619e45d1cd72db961e7 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Sat, 18 Feb 2012 22:29:42 +0530 Subject: [PATCH] org-e-html: Use prefix consistently and cleanup some code --- EXPERIMENTAL/org-e-html.el | 1562 ++++++++------------------------------------ 1 file changed, 269 insertions(+), 1293 deletions(-) diff --git a/EXPERIMENTAL/org-e-html.el b/EXPERIMENTAL/org-e-html.el index 7079b5f6a..c75274e20 100644 --- a/EXPERIMENTAL/org-e-html.el +++ b/EXPERIMENTAL/org-e-html.el @@ -38,7 +38,7 @@ ;;; org-xhtml.el (defvar org-e-html-debug nil) -(defvar org-e-html-pp nil) +(defvar org-e-html-pp t) (defun org-e-html-debug (fmt &rest args) (when org-e-html-debug @@ -84,14 +84,14 @@ :tag "Org Export HTML" :group 'org-export) -(defconst org-export-e-html-special-string-regexps +(defconst org-e-html-special-string-regexps '(("\\\\-" . "­") ("---\\([^-]\\)" . "—\\1") ("--\\([^-]\\)" . "–\\1") ("\\.\\.\\." . "…")) "Regular expressions for special string conversion.") -(defcustom org-export-e-html-footnotes-section "
+(defcustom org-e-html-footnotes-section "

%s:

%s @@ -104,29 +104,29 @@ by the footnotes themselves." :group 'org-export-e-html :type 'string) -(defcustom org-export-e-html-footnote-format "%s" +(defcustom org-e-html-footnote-format "%s" "The format for the footnote reference. %s will be replaced by the footnote reference itself." :group 'org-export-e-html :type 'string) -(defcustom org-export-e-html-footnote-separator ", " +(defcustom org-e-html-footnote-separator ", " "Text used to separate footnotes." :group 'org-export-e-html :type 'string) -(defcustom org-export-e-html-coding-system nil +(defcustom org-e-html-coding-system nil "Coding system for HTML export, defaults to `buffer-file-coding-system'." :group 'org-export-e-html :type 'coding-system) -(defcustom org-export-e-html-extension "html" +(defcustom org-e-html-extension "html" "The extension for exported HTML files." :group 'org-export-e-html :type 'string) -(defcustom org-export-e-html-xml-declaration +(defcustom org-e-html-xml-declaration '(("html" . "") ("php" . "\"; ?>")) "The extension for exported HTML files. @@ -140,14 +140,14 @@ and corresponding declarations." (cons (string :tag "Extension") (string :tag "Declaration"))))) -(defcustom org-export-e-html-style-include-scripts t +(defcustom org-e-html-style-include-scripts t "Non-nil means include the JavaScript snippets in exported HTML files. -The actual script is defined in `org-export-e-html-scripts' and should +The actual script is defined in `org-e-html-scripts' and should not be modified." :group 'org-export-e-html :type 'boolean) -(defconst org-export-e-html-scripts +(defconst org-e-html-scripts "" "Basic JavaScript that is needed by HTML files produced by Org-mode.") -(defconst org-export-e-html-style-default +(defconst org-e-html-style-default "" "The default style specification for exported HTML files. -Please use the variables `org-export-e-html-style' and -`org-export-e-html-style-extra' to add to this style. If you wish to not +Please use the variables `org-e-html-style' and +`org-e-html-style-extra' to add to this style. If you wish to not have the default style included, customize the variable -`org-export-e-html-style-include-default'.") +`org-e-html-style-include-default'.") -(defcustom org-export-e-html-style-include-default t +(defcustom org-e-html-style-include-default t "Non-nil means include the default style in exported HTML files. -The actual style is defined in `org-export-e-html-style-default' and should -not be modified. Use the variables `org-export-e-html-style' to add +The actual style is defined in `org-e-html-style-default' and should +not be modified. Use the variables `org-e-html-style' to add your own style information." :group 'org-export-e-html :type 'boolean) ;;;###autoload -(put 'org-export-e-html-style-include-default 'safe-local-variable 'booleanp) +(put 'org-e-html-style-include-default 'safe-local-variable 'booleanp) -(defcustom org-export-e-html-style "" +(defcustom org-e-html-style "" "Org-wide style definitions for exported HTML files. This variable needs to contain the full HTML structure to provide a style, @@ -264,24 +264,24 @@ If you'd like to refer to an external style file, use something like As the value of this option simply gets inserted into the HTML header, you can \"misuse\" it to add arbitrary text to the header. -See also the variable `org-export-e-html-style-extra'." +See also the variable `org-e-html-style-extra'." :group 'org-export-e-html :type 'string) ;;;###autoload -(put 'org-export-e-html-style 'safe-local-variable 'stringp) +(put 'org-e-html-style 'safe-local-variable 'stringp) -(defcustom org-export-e-html-style-extra "" +(defcustom org-e-html-style-extra "" "Additional style information for HTML export. The value of this variable is inserted into the HTML buffer right after -the value of `org-export-e-html-style'. Use this variable for per-file +the value of `org-e-html-style'. Use this variable for per-file settings of style information, and do not forget to surround the style settings with tags." :group 'org-export-e-html :type 'string) ;;;###autoload -(put 'org-export-e-html-style-extra 'safe-local-variable 'stringp) +(put 'org-e-html-style-extra 'safe-local-variable 'stringp) -(defcustom org-export-e-html-mathjax-options +(defcustom org-e-html-mathjax-options '((path "http://orgmode.org/mathjax/MathJax.js") (scale "100") (align "center") @@ -314,7 +314,7 @@ You can also customize this for each buffer, using something like (list :tag "mathml (should MathML display be used is possible)" (const :format " " mathml) (boolean)))) -(defun org-export-e-html-mathjax-config (template options in-buffer) +(defun org-e-html-mathjax-config (template options in-buffer) "Insert the user setup into the matchjax template." (let (name val (yes " ") (no "// ") x) (mapc @@ -341,7 +341,7 @@ You can also customize this for each buffer, using something like ;; Return the modified template template)) -(defcustom org-export-e-html-mathjax-template +(defcustom org-e-html-mathjax-template "