branch: externals/org commit f70e36252ac4eb04c67a60aec7d39515e10277bf Merge: a0a87d5 093c94e Author: Nicolas Goaziou <m...@nicolasgoaziou.fr> Commit: Nicolas Goaziou <m...@nicolasgoaziou.fr>
Merge branch 'maint' --- lisp/ox-texinfo.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 22e93c9..5d09cc2 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1233,13 +1233,13 @@ holding contextual information." :texinfo-entries-cache))) (cached-entries (gethash scope cache 'no-cache))) (if (not (eq cached-entries 'no-cache)) cached-entries - (let ((sections (org-texinfo--sectioning-structure info))) + (let* ((sections (org-texinfo--sectioning-structure info)) + (max-depth (length sections))) (puthash scope (cl-remove-if (lambda (h) (or (org-not-nil (org-export-get-node-property :COPYING h t)) - (>= (org-export-get-relative-level h info) - (length sections)))) + (< max-depth (org-export-get-relative-level h info)))) (org-export-collect-headlines info 1 scope)) cache)))))