Преглед на файлове

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