From 933137aa02f663fd9917759ca465d608257e1f00 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sun, 12 Apr 2009 08:22:39 +0200 Subject: [PATCH] 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. --- lisp/ChangeLog | 5 +++++ lisp/org-exp.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f980ed13..22dcbd89f 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-04-12 Carsten Dominik + + * org-exp.el (org-default-export-plist): Handle undefined + variables. + 2009-04-11 Carsten Dominik * org.el (org-sort-entries-or-items): Match TODO keywrds diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 73db045b2..ddb746545 100644 --- a/lisp/org-exp.el +++ b/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