Browse Source

Update for change in letrec behavior

* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions):
* lisp/ox.el (org-export--selected-trees):
(org-export--prune-tree):
(org-export--merge-external-footnote-definitions):
(org-export--footnote-reference-map): Provide nil value for binders.

Using

  (letrec ((SYMBOL)) ...)

to bind SYMBOL to nil relies on (setq SYMBOL) setting SYMBOL to nil.  As
of 5d93a89 (Byte compiler: on setq with an odd number of arguments,
generate a `signal', 2015-11-26) in the Emacs repo, setq signals an
error when given an odd number of arguments.

Reported-by: Zack Piper <zack@apertron.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103539>
<http://permalink.gmane.org/gmane.emacs.devel/196182>
Kyle Meyer 9 years ago
parent
commit
f57778090e
2 changed files with 6 additions and 6 deletions
  1. 1 1
      lisp/ox-latex.el
  2. 5 5
      lisp/ox.el

+ 1 - 1
lisp/ox-latex.el

@@ -1514,7 +1514,7 @@ just outside of it."
        (org-export-data
 	(org-export-get-footnote-definition ref info) info))))
    ;; Find every footnote reference in ELEMENT.
-   (letrec ((all-refs)
+   (letrec ((all-refs nil)
 	    (search-refs
 	     (lambda (data)
 	       ;; Return a list of all footnote references never seen

+ 5 - 5
lisp/ox.el

@@ -1779,7 +1779,7 @@ INFO is a plist holding export options."
 	;; If FILETAGS contains a select tag, every headline or
 	;; inlinetask is returned.
 	(org-element-map data '(headline inlinetask) #'identity)
-      (letrec ((selected-trees)
+      (letrec ((selected-trees nil)
 	       (walk-data
 		(lambda (data genealogy)
 		  (let ((type (org-element-type data)))
@@ -2715,7 +2715,7 @@ DATA is the parse tree to traverse.  INFO is the plist holding
 export info.  Also set `:ignore-list' in INFO to a list of
 objects which should be ignored during export, but not removed
 from tree."
-  (letrec ((ignore)
+  (letrec ((ignore nil)
 	   ;; First find trees containing a select tag, if any.
 	   (selected (org-export--selected-trees data info))
 	   (walk-data
@@ -2939,7 +2939,7 @@ not, are considered."
 	 ;; Otherwise add each definition at the end of the section where
 	 ;; it is first referenced.
 	 (t
-	  (letrec ((seen)
+	  (letrec ((seen nil)
 		   (insert-definitions
 		    (lambda (data)
 		      ;; Insert definitions in the same section as
@@ -3760,8 +3760,8 @@ INFO is a plist containing export state.  By default, as soon as
 a new footnote reference is encountered, FUNCTION is called onto
 its definition.  However, if BODY-FIRST is non-nil, this step is
 delayed until the end of the process."
-  (letrec ((definitions)
-	   (seen-refs)
+  (letrec ((definitions nil)
+	   (seen-refs nil)
 	   (search-ref
 	    (lambda (data delayp)
 	      ;; Search footnote references through DATA, filling