[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo Structuring.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo Structuring.pm |
Date: |
Mon, 04 Feb 2013 12:47:30 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 13/02/04 12:47:30
Modified files:
tp/Texinfo : Structuring.pm
Log message:
When doing the @top menu, go through @part to collect @part children.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Structuring.pm?cvsroot=texinfo&r1=1.146&r2=1.147
Patches:
Index: Structuring.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Structuring.pm,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -b -r1.146 -r1.147
--- Structuring.pm 2 Feb 2013 23:18:24 -0000 1.146
+++ Structuring.pm 4 Feb 2013 12:47:30 -0000 1.147
@@ -1626,11 +1626,29 @@
my $node = shift;
my @node_childs;
+ if ($node->{'extra'}->{'associated_section'}->{'section_childs'}) {
foreach my $child
(@{$node->{'extra'}->{'associated_section'}->{'section_childs'}}) {
if ($child->{'extra'} and $child->{'extra'}->{'associated_node'}) {
push @node_childs, $child->{'extra'}->{'associated_node'};
}
}
+ }
+ # Special case for @top. Gather all the children of the @part following
+ # @top.
+ if ($node->{'extra'}->{'associated_section'}->{'cmdname'} eq 'top') {
+ my $current = $node->{'extra'}->{'associated_section'};
+ while ($current->{'section_next'}) {
+ $current = $current->{'section_next'};
+ if ($current->{'cmdname'} and $current->{'cmdname'} eq 'part'
+ and $current->{'section_childs'}) {
+ foreach my $child (@{$current->{'section_childs'}}) {
+ if ($child->{'extra'} and $child->{'extra'}->{'associated_node'}) {
+ push @node_childs, $child->{'extra'}->{'associated_node'};
+ }
+ }
+ }
+ }
+ }
if (scalar(@node_childs)) {
my %existing_entries;
if ($node->{'menus'} and @{$node->{'menus'}}) {
@@ -1711,9 +1729,7 @@
if ($content->{'cmdname'} and $content->{'cmdname'} eq 'node'
and (scalar(@{$content->{'extra'}->{'nodes_manuals'}}) == 1)
and $content->{'extra'}
- and $content->{'extra'}->{'associated_section'}
- and $content->{'extra'}->{'associated_section'}->{'section_childs'}
- and
scalar(@{$content->{'extra'}->{'associated_section'}->{'section_childs'}})) {
+ and $content->{'extra'}->{'associated_section'}) {
complete_node_menu($self, $content);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp/Texinfo Structuring.pm,
Patrice Dumas <=