forked from mirrors/org-mode
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>
This commit is contained in:
parent
d1796108f6
commit
f57778090e
|
@ -1514,7 +1514,7 @@ just outside of it."
|
||||||
(org-export-data
|
(org-export-data
|
||||||
(org-export-get-footnote-definition ref info) info))))
|
(org-export-get-footnote-definition ref info) info))))
|
||||||
;; Find every footnote reference in ELEMENT.
|
;; Find every footnote reference in ELEMENT.
|
||||||
(letrec ((all-refs)
|
(letrec ((all-refs nil)
|
||||||
(search-refs
|
(search-refs
|
||||||
(lambda (data)
|
(lambda (data)
|
||||||
;; Return a list of all footnote references never seen
|
;; Return a list of all footnote references never seen
|
||||||
|
|
10
lisp/ox.el
10
lisp/ox.el
|
@ -1779,7 +1779,7 @@ INFO is a plist holding export options."
|
||||||
;; If FILETAGS contains a select tag, every headline or
|
;; If FILETAGS contains a select tag, every headline or
|
||||||
;; inlinetask is returned.
|
;; inlinetask is returned.
|
||||||
(org-element-map data '(headline inlinetask) #'identity)
|
(org-element-map data '(headline inlinetask) #'identity)
|
||||||
(letrec ((selected-trees)
|
(letrec ((selected-trees nil)
|
||||||
(walk-data
|
(walk-data
|
||||||
(lambda (data genealogy)
|
(lambda (data genealogy)
|
||||||
(let ((type (org-element-type data)))
|
(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
|
export info. Also set `:ignore-list' in INFO to a list of
|
||||||
objects which should be ignored during export, but not removed
|
objects which should be ignored during export, but not removed
|
||||||
from tree."
|
from tree."
|
||||||
(letrec ((ignore)
|
(letrec ((ignore nil)
|
||||||
;; First find trees containing a select tag, if any.
|
;; First find trees containing a select tag, if any.
|
||||||
(selected (org-export--selected-trees data info))
|
(selected (org-export--selected-trees data info))
|
||||||
(walk-data
|
(walk-data
|
||||||
|
@ -2939,7 +2939,7 @@ not, are considered."
|
||||||
;; Otherwise add each definition at the end of the section where
|
;; Otherwise add each definition at the end of the section where
|
||||||
;; it is first referenced.
|
;; it is first referenced.
|
||||||
(t
|
(t
|
||||||
(letrec ((seen)
|
(letrec ((seen nil)
|
||||||
(insert-definitions
|
(insert-definitions
|
||||||
(lambda (data)
|
(lambda (data)
|
||||||
;; Insert definitions in the same section as
|
;; 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
|
a new footnote reference is encountered, FUNCTION is called onto
|
||||||
its definition. However, if BODY-FIRST is non-nil, this step is
|
its definition. However, if BODY-FIRST is non-nil, this step is
|
||||||
delayed until the end of the process."
|
delayed until the end of the process."
|
||||||
(letrec ((definitions)
|
(letrec ((definitions nil)
|
||||||
(seen-refs)
|
(seen-refs nil)
|
||||||
(search-ref
|
(search-ref
|
||||||
(lambda (data delayp)
|
(lambda (data delayp)
|
||||||
;; Search footnote references through DATA, filling
|
;; Search footnote references through DATA, filling
|
||||||
|
|
Loading…
Reference in New Issue