浏览代码

ox-texinfo: Fix parse tree corruption

* lisp/ox-texinfo.el (org-texinfo--normalize-headlines): Properly add
  a section to the contents.
Nicolas Goaziou 10 年之前
父节点
当前提交
1adec31993
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      lisp/ox-texinfo.el

+ 3 - 2
lisp/ox-texinfo.el

@@ -425,8 +425,9 @@ Return new tree."
 	  (let ((first (org-element-map contents '(headline section)
 			 #'identity info t)))
 	    (unless (eq (org-element-type first) 'section)
-	      (org-element-set-contents
-	       hl (cons `(section (:parent ,hl)) contents)))))))
+	      (apply #'org-element-set-contents
+		     hl
+		     (cons `(section (:parent ,hl)) contents)))))))
     info)
   tree)