Browse Source

Revert "ox-texinfo: Move menu handling from sections to headlines"

This reverts commit 988e8802a6f8638b8e57d146cd38282169346e0e.
Nicolas Goaziou 7 năm trước cách đây
mục cha
commit
379a22c9c6
1 tập tin đã thay đổi với 8 bổ sung6 xóa
  1. 8 6
      lisp/ox-texinfo.el

+ 8 - 6
lisp/ox-texinfo.el

@@ -896,8 +896,7 @@ holding contextual information."
 	 (t
 	  (concat (format "@node %s\n" (org-texinfo--get-node headline info))
 		  (format section-fmt full-text)
-		  contents "\n"
-		  (org-texinfo-make-menu headline info))))))))
+		  contents)))))))
 
 (defun org-texinfo-format-headline-default-function
   (todo _todo-type priority text tags)
@@ -1357,11 +1356,14 @@ contextual information."
 
 ;;;; Section
 
-(defun org-texinfo-section (section contents _info)
+(defun org-texinfo-section (section contents info)
   "Transcode a SECTION element from Org to Texinfo.
-CONTENTS holds the contents of the section."
-  (and (org-export-get-parent-headline section) ;ignore first section
-       contents))
+CONTENTS holds the contents of the section.  INFO is a plist
+holding contextual information."
+  (let ((parent (org-export-get-parent-headline section)))
+    (when parent			;ignore very first section
+      (org-trim
+       (concat contents "\n" (org-texinfo-make-menu parent info))))))
 
 ;;;; Special Block