summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-02-20 18:50:27 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-02-20 18:50:27 +0100
commit719dda85ea50d0cb70e7e76731ab71922db87932 (patch)
tree0c6d63fa7cf8a6fc18e73e1f48cc6d3a864bacff
parent014de0a532cbc60987d09d6040ed46195cffdf12 (diff)
downloadorg-mode-719dda85ea50d0cb70e7e76731ab71922db87932.tar.gz
ox: Small refactoring
* lisp/ox.el (org-export-document-properties): New variable. (org-export-prune-tree, org-export-remove-uninterpreted-data): Use new variable.
-rw-r--r--lisp/ox.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ox.el b/lisp/ox.el
index b79db22..f2f220b 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -174,6 +174,14 @@ These keywords are not directly associated to a property. The
way they are handled must be hard-coded into
`org-export--get-inbuffer-options' function.")
+(defconst org-export-document-properties
+ (delq nil
+ (mapcar (lambda (option)
+ (and (member (nth 1 option) org-element-document-properties)
+ (car option)))
+ org-export-options-alist))
+ "List of properties containing parsed data.")
+
(defconst org-export-filters-alist
'((:filter-body . org-export-filter-body-functions)
(:filter-bold . org-export-filter-bold-functions)
@@ -2066,7 +2074,7 @@ from tree."
(org-element-extract-element first-element))))
;; Prune tree and communication channel.
(funcall walk-data data)
- (dolist (prop '(:author :date :title))
+ (dolist (prop org-export-document-properties)
(funcall walk-data (plist-get info prop)))
;; Eventually set `:ignore-list'.
(plist-put info :ignore-list ignore)))
@@ -2078,7 +2086,7 @@ options. Each uninterpreted element or object is changed back
into a string. Contents, if any, are not modified. The parse
tree is modified by side effect."
(org-export--remove-uninterpreted-data-1 data info)
- (dolist (prop '(:author :date :title))
+ (dolist (prop org-export-document-properties)
(plist-put info
prop
(org-export--remove-uninterpreted-data-1