diff options
authorNicolas Goaziou <>2014-01-10 08:48:57 (GMT)
committer Nicolas Goaziou <>2014-01-10 08:52:08 (GMT)
commit78e66c7212864ffaa6e93a64c2883e282d106b29 (patch)
parent2c782da8019de4eded3b5686fcfffa51abda1585 (diff)
ox-html: Fix checkbox customization
* lisp/ox-html.el (org-html-checkbox-types): Fix docstring. (org-html-checkbox-type): Use symbols instead of strings. It avoids to rely on `intern' later on. Modify docstring so its first line contains only a complete sentence. (org-html-checkbox): Use `assq' instead of `assoc'. This fixes 2c782da8019de4eded3b5686fcfffa51abda1585.
1 files changed, 18 insertions, 17 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 61defc9..b294cf6 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -988,25 +988,27 @@ org-info.js for your website."
(trans . "<input type='checkbox' />"))))
"Alist of checkbox types.
The cdr of each entry is an alist list three checkbox types for
-html export: \"on\", \"off\" and \"trans\".
+HTML export: `on', `off' and `trans'.
The choices are:
- - unicode characters (html entities)
- - ascii characters
- - html checkboxes
+ - Unicode characters (HTML entities)
+ - ASCII characters
+ - HTML checkboxes
Note that only the ascii characters implement tri-state
-checkboxes. The other two use the \"off\" checkbox for \"trans\".")
+checkboxes. The other two use the `off' checkbox for `trans'.")
-(defcustom org-html-checkbox-type "ascii"
- "The type of checkboxes to use for html export. See
-`org-html-checkbox-types' for for the values used for each option."
+(defcustom org-html-checkbox-type 'ascii
+ "The type of checkboxes to use for HTML export.
+See `org-html-checkbox-types' for for the values used for each
:group 'org-export-html
:version "24.4"
:package-version '(Org . "8.0")
:type '(choice
- (const :tag "ASCII characters" "ascii")
- (const :tag "Unicode characters" "unicode")
- (const :tag "HTML checkboxes" "html")))
+ (const :tag "ASCII characters" ascii)
+ (const :tag "Unicode characters" unicode)
+ (const :tag "HTML checkboxes" html)))
(defcustom org-html-metadata-timestamp-format "%Y-%m-%d %a %H:%M"
"Format used for timestamps in preamble, postamble and metadata.
@@ -2451,12 +2453,11 @@ contextual information."
;;;; Item
(defun org-html-checkbox (checkbox info)
- "Format CHECKBOX into HTML. INFO is a plist holding contextual
-See `org-html-checkbox-type' for customization options."
- (cdr (assoc checkbox
- (cdr (assoc (intern org-html-checkbox-type)
- org-html-checkbox-types)))))
+ "Format CHECKBOX into HTML.
+INFO is a plist holding contextual information. See
+`org-html-checkbox-type' for customization options."
+ (cdr (assq checkbox
+ (cdr (assq org-html-checkbox-type org-html-checkbox-types)))))
(defun org-html-format-list-item (contents type checkbox info
&optional term-counter-id