Selaa lähdekoodia

Export: Fix bug with #+BIND

Carsten Dominik 15 vuotta sitten
vanhempi
commit
8cd94ce203
2 muutettua tiedostoa jossa 9 lisäystä ja 2 poistoa
  1. 2 0
      lisp/ChangeLog
  2. 7 2
      lisp/org-exp.el

+ 2 - 0
lisp/ChangeLog

@@ -1,5 +1,7 @@
 2009-08-05  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-exp.el (org-default-export-plist): Respect #+BIND.
+
 	* org.el (org-paste-subtree): Test the kill ring entry if it is
 	going to be used.
 	(org-copy-subtree): Use `org-forward-same-level'.

+ 7 - 2
lisp/org-exp.el

@@ -605,10 +605,15 @@ 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 s v)
+  (let* ((infile (org-infile-export-plist))
+	 (letbind (plist-get infile :let-bind))
+	 (l org-export-plist-vars) rtn e s v)
     (while (setq e (pop l))
       (setq s (nth 2 e)
-	    v (if (boundp s) (symbol-value s) nil)
+	    v (cond
+	       ((assq s letbind) (nth 1 (assq s letbind)))
+	       ((boundp s) (symbol-value s))
+	       (t nil))
 	    rtn (cons (car e) (cons v rtn))))
     rtn))