org-texinfo--normalize-headlines: Use `org-element-create'

This commit is contained in:
Ihor Radchenko 2023-05-03 14:33:48 +02:00
parent a43cc8c9aa
commit 6a7aee2c35
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 3 deletions

View File

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