ox-texinfo: Fix parse tree corruption
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Thu, 14 Aug 2014 12:08:16 +0000 (14 14:08 +0200)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Thu, 14 Aug 2014 12:08:16 +0000 (14 14:08 +0200)
* lisp/ox-texinfo.el (org-texinfo--normalize-headlines): Properly add
  a section to the contents.

lisp/ox-texinfo.el

index 2dc77fd..c4b2ebf 100644 (file)
@@ -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)