[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Structuring.pm t/results/sec...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Structuring.pm t/results/sec... |
Date: |
Wed, 23 Nov 2011 00:28:05 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/11/23 00:28:05
Modified files:
tp/Texinfo : Structuring.pm
tp/t/results/sectioning: lowered_subsubsection.pl
menutextorder.pl
nodename_parentheses.pl
two_nodes_between_chapters.pl
Log message:
Warn for menu and automatic sectioning mismatches when there is a
menu direction for all directions.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Structuring.pm?cvsroot=texinfo&r1=1.106&r2=1.107
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/lowered_subsubsection.pl?cvsroot=texinfo&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/menutextorder.pl?cvsroot=texinfo&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/nodename_parentheses.pl?cvsroot=texinfo&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/two_nodes_between_chapters.pl?cvsroot=texinfo&r1=1.7&r2=1.8
Patches:
Index: Texinfo/Structuring.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Structuring.pm,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -b -r1.106 -r1.107
--- Texinfo/Structuring.pm 22 Nov 2011 22:06:22 -0000 1.106
+++ Texinfo/Structuring.pm 23 Nov 2011 00:28:04 -0000 1.107
@@ -450,10 +450,8 @@
and $node->{'node_'.$direction}->{'extra'}
and $node->{'node_'.$direction}->{'extra'}->{'normalized'}
and $node->{'node_'.$direction}->{'extra'}->{'normalized'} eq
'Top') {
- #print STDERR "node $node ".
Texinfo::Parser::_node_extra_to_texi($node->{'extra'}).", $direction already
exists:
".Texinfo::Parser::_node_extra_to_texi($node->{'node_'.$direction}->{'extra'})."\n";
next;
}
- #die if ($node->{'node_'.$direction});
if ($node->{'extra'}->{'associated_section'}) {
my $section = $node->{'extra'}->{'associated_section'};
# prefer the section associated to the part for node directions.
@@ -474,18 +472,33 @@
last;
}
}
+ # if set, a direction was found using sections. Check consistency
+ # with menu before going to the next direction
if ($node->{'node_'.$direction}) {
- if ($self->{'SHOW_MENU'} and !$node->{'menu_'.$direction}) {
+ if ($self->{'SHOW_MENU'}) {
+ if (!$node->{'menu_'.$direction}) {
$self->line_warn(sprintf($self->
__("Node `%s' is %s for `%s' in sectioning but not in
menu"),
Texinfo::Parser::_node_extra_to_texi($node->{'node_'.$direction}->{'extra'}),
$direction,
Texinfo::Parser::_node_extra_to_texi($node->{'extra'})),
$node->{'line_nr'});
+ } elsif ($node->{'menu_'.$direction} ne
$node->{'node_'.$direction}) {
+ $self->line_warn(sprintf($self->
+ __("Node %s `%s' in menu `%s' and in sectioning `%s'
differ"),
+ $direction,
+ Texinfo::Parser::_node_extra_to_texi($node->{'extra'}),
+
Texinfo::Parser::_node_extra_to_texi($node->{'menu_'.$direction}->{'extra'}),
+
Texinfo::Parser::_node_extra_to_texi($node->{'node_'.$direction}->{'extra'})),
+ $node->{'line_nr'});
+ }
}
next;
}
}
+ # no direction was found using sections, use menus. This allows
+ # using only automatic direction for manuals without sectioning
+ # commands.
if ($node->{'menu_'.$direction}
and !$node->{'menu_'.$direction}->{'extra'}->{'manual_content'})
{
if ($self->{'SHOW_MENU'} and
$node->{'extra'}->{'associated_section'}) {
@@ -500,19 +513,6 @@
$node->{'node_'.$direction} = $node->{'menu_'.$direction};
}
}
- if ($self->{'SHOW_MENU'}) {
- if ($node->{'node_next'}) {
- if ($node->{'menu_next'}
- and $node->{'menu_next'} ne $node->{'node_next'}) {
- $self->line_warn(sprintf($self->
- __("Node following `%s' in menu `%s' and in sectioning `%s'
differ"),
- Texinfo::Parser::_node_extra_to_texi($node->{'extra'}),
-
Texinfo::Parser::_node_extra_to_texi($node->{'menu_next'}->{'extra'}),
-
Texinfo::Parser::_node_extra_to_texi($node->{'node_next'}->{'extra'})),
- $node->{'line_nr'});
- }
- }
- }
} else {
# Special case for Top node.
$node->{'node_up'} = $top_node_up;
Index: t/results/sectioning/lowered_subsubsection.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/sectioning/lowered_subsubsection.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- t/results/sectioning/lowered_subsubsection.pl 22 Nov 2011 22:06:22
-0000 1.12
+++ t/results/sectioning/lowered_subsubsection.pl 23 Nov 2011 00:28:05
-0000 1.13
@@ -2135,6 +2135,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':41: warning: Node up `Lowered subsubsection\' in menu
`Lowered subsec\' and in sectioning `Subsection\' differ
+',
+ 'file_name' => '',
+ 'line_nr' => 41,
+ 'macro' => '',
+ 'text' => 'Node up `Lowered subsubsection\' in menu `Lowered subsec\' and
in sectioning `Subsection\' differ',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':22: Node `Subsection\' lacks menu item for `Lowered
subsubsection\' despite being its Up target
',
'file_name' => '',
Index: t/results/sectioning/menutextorder.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/sectioning/menutextorder.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- t/results/sectioning/menutextorder.pl 22 Nov 2011 22:06:22 -0000
1.11
+++ t/results/sectioning/menutextorder.pl 23 Nov 2011 00:28:05 -0000
1.12
@@ -1903,12 +1903,12 @@
'type' => 'warning'
},
{
- 'error_line' => ':29: warning: Node following `sub1\' in menu `sub3\' and
in sectioning `sub2\' differ
+ 'error_line' => ':29: warning: Node next `sub1\' in menu `sub3\' and in
sectioning `sub2\' differ
',
'file_name' => '',
'line_nr' => 29,
'macro' => '',
- 'text' => 'Node following `sub1\' in menu `sub3\' and in sectioning
`sub2\' differ',
+ 'text' => 'Node next `sub1\' in menu `sub3\' and in sectioning `sub2\'
differ',
'type' => 'warning'
},
{
@@ -1921,6 +1921,15 @@
'type' => 'warning'
},
{
+ 'error_line' => ':32: warning: Node prev `sub2\' in menu `sub3\' and in
sectioning `sub1\' differ
+',
+ 'file_name' => '',
+ 'line_nr' => 32,
+ 'macro' => '',
+ 'text' => 'Node prev `sub2\' in menu `sub3\' and in sectioning `sub1\'
differ',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':35: warning: Node `sub2\' is next for `sub3\' in menu
but not in sectioning
',
'file_name' => '',
@@ -1928,6 +1937,15 @@
'macro' => '',
'text' => 'Node `sub2\' is next for `sub3\' in menu but not in sectioning',
'type' => 'warning'
+ },
+ {
+ 'error_line' => ':35: warning: Node prev `sub3\' in menu `sub1\' and in
sectioning `sub2\' differ
+',
+ 'file_name' => '',
+ 'line_nr' => 35,
+ 'macro' => '',
+ 'text' => 'Node prev `sub3\' in menu `sub1\' and in sectioning `sub2\'
differ',
+ 'type' => 'warning'
}
];
Index: t/results/sectioning/nodename_parentheses.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/sectioning/nodename_parentheses.pl,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- t/results/sectioning/nodename_parentheses.pl 22 Nov 2011 22:06:22
-0000 1.47
+++ t/results/sectioning/nodename_parentheses.pl 23 Nov 2011 00:28:05
-0000 1.48
@@ -1310,12 +1310,12 @@
'type' => 'error'
},
{
- 'error_line' => ':15: warning: Node following `Other node\' in menu
`(manual)node\' and in sectioning `node\' differ
+ 'error_line' => ':15: warning: Node next `Other node\' in menu
`(manual)node\' and in sectioning `node\' differ
',
'file_name' => '',
'line_nr' => 15,
'macro' => '',
- 'text' => 'Node following `Other node\' in menu `(manual)node\' and in
sectioning `node\' differ',
+ 'text' => 'Node next `Other node\' in menu `(manual)node\' and in
sectioning `node\' differ',
'type' => 'warning'
},
{
Index: t/results/sectioning/two_nodes_between_chapters.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/sectioning/two_nodes_between_chapters.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- t/results/sectioning/two_nodes_between_chapters.pl 22 Nov 2011 00:35:11
-0000 1.7
+++ t/results/sectioning/two_nodes_between_chapters.pl 23 Nov 2011 00:28:05
-0000 1.8
@@ -1029,7 +1029,17 @@
$result_menus{'two_nodes_between_chapters'}{'menu_child'}{'menu_next'}{'menu_up'}
= $result_menus{'two_nodes_between_chapters'};
$result_menus{'two_nodes_between_chapters'}{'menu_child'}{'menu_up'} =
$result_menus{'two_nodes_between_chapters'};
-$result_errors{'two_nodes_between_chapters'} = [];
+$result_errors{'two_nodes_between_chapters'} = [
+ {
+ 'error_line' => ':15: warning: Node prev `chapter 2\' in menu `node
between chapters\' and in sectioning `chapter 1\' differ
+',
+ 'file_name' => '',
+ 'line_nr' => 15,
+ 'macro' => '',
+ 'text' => 'Node prev `chapter 2\' in menu `node between chapters\' and in
sectioning `chapter 1\' differ',
+ 'type' => 'warning'
+ }
+];
$result_elements{'two_nodes_between_chapters'} = [