|
@@ -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)))))
|
|
|
|