瀏覽代碼

ox-latex: Fix "void function nil" error

* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix "void
  function nil" error.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102477>
Nicolas Goaziou 9 年之前
父節點
當前提交
a274c21419
共有 1 個文件被更改,包括 14 次插入16 次删除
  1. 14 16
      lisp/ox-latex.el

+ 14 - 16
lisp/ox-latex.el

@@ -1480,22 +1480,20 @@ just outside of it."
        (org-export-data
 	(org-export-get-footnote-definition ref info) info))))
    ;; Find every footnote reference in ELEMENT.
-   (let* (all-refs
-	  search-refs			; For byte-compiler.
-	  (search-refs
-	   (function
-	    (lambda (data)
-	      ;; Return a list of all footnote references never seen
-	      ;; before in DATA.
-	      (org-element-map data 'footnote-reference
-		(lambda (ref)
-		  (when (org-export-footnote-first-reference-p ref info)
-		    (push ref all-refs)
-		    (when (eq (org-element-property :type ref) 'standard)
-		      (funcall search-refs
-			       (org-export-get-footnote-definition ref info)))))
-		info)
-	      (reverse all-refs)))))
+   (letrec ((all-refs)
+	    (search-refs
+	     (lambda (data)
+	       ;; Return a list of all footnote references never seen
+	       ;; before in DATA.
+	       (org-element-map data 'footnote-reference
+		 (lambda (ref)
+		   (when (org-export-footnote-first-reference-p ref info)
+		     (push ref all-refs)
+		     (when (eq (org-element-property :type ref) 'standard)
+		       (funcall search-refs
+				(org-export-get-footnote-definition ref info)))))
+		 info)
+	       (reverse all-refs))))
      (funcall search-refs element))
    ""))