Function: org-odt-add-automatic-style
org-odt-add-automatic-style is a byte-compiled function defined in
ox-odt.el.gz.
Signature
(org-odt-add-automatic-style OBJECT-TYPE &optional OBJECT-PROPS)
Documentation
Create an automatic style of type OBJECT-TYPE with param OBJECT-PROPS.
OBJECT-PROPS is (typically) a plist created by passing
"#+ATTR_ODT: " option of the object in question to
org-odt-parse-block-attributes.
Use org-odt-object-counters to generate an automatic
OBJECT-NAME and STYLE-NAME. If OBJECT-PROPS is non-nil, add a
new entry in org-odt-automatic-styles. Return (OBJECT-NAME
. STYLE-NAME).
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-odt.el.gz
;;;; Document styles
(defun org-odt-add-automatic-style (object-type &optional object-props)
"Create an automatic style of type OBJECT-TYPE with param OBJECT-PROPS.
OBJECT-PROPS is (typically) a plist created by passing
\"#+ATTR_ODT: \" option of the object in question to
`org-odt-parse-block-attributes'.
Use `org-odt-object-counters' to generate an automatic
OBJECT-NAME and STYLE-NAME. If OBJECT-PROPS is non-nil, add a
new entry in `org-odt-automatic-styles'. Return (OBJECT-NAME
. STYLE-NAME)."
(cl-assert (stringp object-type))
(let* ((object (intern object-type))
(seqvar object)
(seqno (1+ (or (plist-get org-odt-object-counters seqvar) 0)))
(object-name (format "%s%d" object-type seqno)) style-name)
(setq org-odt-object-counters
(plist-put org-odt-object-counters seqvar seqno))
(when object-props
(setq style-name (format "Org%s" object-name))
(setq org-odt-automatic-styles
(plist-put org-odt-automatic-styles object
(append (list (list style-name object-props))
(plist-get org-odt-automatic-styles object)))))
(cons object-name style-name)))