浏览代码

Export: Handle undefined variables.

Some of the standard export options are now defined in backend
specific files.  This commit makes sure that building the options
property list will not cause an error because of unneeded (for the
backend) undefined variables.
Carsten Dominik 16 年之前
父节点
当前提交
933137aa02
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. 5 0
      lisp/ChangeLog
  2. 4 2
      lisp/org-exp.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-04-12  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-exp.el (org-default-export-plist): Handle undefined
+	variables.
+
 2009-04-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-sort-entries-or-items): Match TODO keywrds

+ 4 - 2
lisp/org-exp.el

@@ -579,9 +579,11 @@ Each element is a list of 3 items:
 
 (defun org-default-export-plist ()
   "Return the property list with default settings for the export variables."
-  (let ((l org-export-plist-vars) rtn e)
+  (let ((l org-export-plist-vars) rtn e s v)
     (while (setq e (pop l))
-      (setq rtn (cons (car e) (cons (symbol-value (nth 2 e)) rtn))))
+      (setq s (nth 2 e)
+	    v (if (boundp s) (symbol-value s) nil)
+	    rtn (cons s (cons v rtn))))
     rtn))
 
 (defvar org-export-inbuffer-options-extra nil