[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Parser.pm Texinfo/Conve...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Parser.pm Texinfo/Conve... |
Date: |
Wed, 02 Nov 2011 20:46:38 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/11/02 20:46:38
Modified files:
tp : TODO
tp/Texinfo : Parser.pm
tp/Texinfo/Convert: HTML.pm
tp/t/results/invalid_nestings: node_in_copying.pl
node_in_copying_not_closed.pl
section_in_table.pl
Log message:
Change error message in case of a @øection or @node interrupting a
block command, as asked for in
https://savannah.gnu.org/bugs/?15514
Menu in simple format resets the menu entries count.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.203&r2=1.204
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.329&r2=1.330
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.199&r2=1.200
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/node_in_copying.pl?cvsroot=texinfo&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/node_in_copying_not_closed.pl?cvsroot=texinfo&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/section_in_table.pl?cvsroot=texinfo&r1=1.9&r2=1.10
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -b -r1.203 -r1.204
--- TODO 2 Nov 2011 19:13:57 -0000 1.203
+++ TODO 2 Nov 2011 20:46:37 -0000 1.204
@@ -11,12 +11,6 @@
@set txicodequotebacktick
@codequotebacktick
-Verify that everything on
-https://savannah.gnu.org/bugs/?group=texinfo
-is fixed and tested for.
-Remains:
-https://savannah.gnu.org/bugs/?15514
-
Bugs
====
@@ -44,6 +38,7 @@
Instead of _set_global_multiple_commands and _unset_global_multiple_commands
have a better granularity and do something per command, with the possibility
to really revert everything, including things that are not set by set_conf.
+(There is a FIXME in the code).
Texinfo::Convert::Text
@c in menu lines (and maybe at other places) should be replaced by
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.329
retrieving revision 1.330
diff -u -b -r1.329 -r1.330
--- Texinfo/Parser.pm 31 Oct 2011 18:04:26 -0000 1.329
+++ Texinfo/Parser.pm 2 Nov 2011 20:46:37 -0000 1.330
@@ -1465,12 +1465,13 @@
# If the last argument is given it is the command being closed if
# hadn't there be an error, currently only block command, used for a
# better error message.
-sub _close_current($$$;$)
+sub _close_current($$$;$$)
{
my $self = shift;
my $current = shift;
my $line_nr = shift;
my $command = shift;
+ my $interrupting_command = shift;
if ($current->{'cmdname'}) {
if (exists($brace_commands{$current->{'cmdname'}})) {
@@ -1481,6 +1482,10 @@
if (defined($command)) {
$self->line_error(sprintf($self->__("address@hidden' expected `%s',
but saw `%s'"),
$current->{'cmdname'}, $command), $line_nr);
+ } elsif ($interrupting_command) {
+ $self->line_error(sprintf($self->__("address@hidden seen before
address@hidden %s"),
+ $interrupting_command,
$current->{'cmdname'}),
+ $line_nr);
} else {
$self->line_error(sprintf($self->__("No matching `%cend %s'"),
ord('@'), $current->{'cmdname'}), $line_nr);
@@ -1530,12 +1535,13 @@
# a command arg means closing until that command is found.
# no command arg means closing until the root or a root_command
# is found.
-sub _close_commands($$$;$)
+sub _close_commands($$$;$$)
{
my $self = shift;
my $current = shift;
my $line_nr = shift;
my $command = shift;
+ my $interrupting_command = shift;;
$current = _end_paragraph($self, $current, $line_nr);
$current = _end_preformatted($self, $current, $line_nr);
@@ -1556,7 +1562,8 @@
or ($command and $current->{'parent'}->{'cmdname'}
and
$context_brace_commands{$current->{'parent'}->{'cmdname'}})))){
$self->_close_command_cleanup($current);
- $current = $self->_close_current($current, $line_nr, $command);
+ $current = $self->_close_current($current, $line_nr, $command,
+ $interrupting_command);
}
my $closed_command;
@@ -3813,7 +3820,8 @@
# commands without braces and not block commands, ie no @end
if (defined($self->{'misc_commands'}->{$command})) {
if ($root_commands{$command} or $command eq 'bye') {
- $current = _close_commands($self, $current, $line_nr);
+ $current = _close_commands($self, $current, $line_nr, undef,
+ $command);
# root_level commands leads to starting setting a new root
# for the whole document and stuffing the preceding text
# as the first content, this is done only once.
Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -b -r1.199 -r1.200
--- Texinfo/Convert/HTML.pm 2 Nov 2011 19:13:57 -0000 1.199
+++ Texinfo/Convert/HTML.pm 2 Nov 2011 20:46:37 -0000 1.200
@@ -2247,6 +2247,7 @@
}
+my $html_menu_entry_index = 0;
sub _convert_preformatted_commands($$$$)
{
my $self = shift;
@@ -2254,6 +2255,10 @@
my $command = shift;
my $content = shift;
+ if ($cmdname eq 'menu') {
+ $html_menu_entry_index = 0;
+ }
+
if ($content ne '' and !$self->in_string()) {
if ($self->get_conf('COMPLEX_FORMAT_IN_TABLE')) {
if ($indented_preformatted_commands{$cmdname}) {
@@ -2511,7 +2516,6 @@
return 0;
}
-my $html_menu_entry_index;
sub _convert_menu_command($$$$)
{
my $self = shift;
Index: t/results/invalid_nestings/node_in_copying.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/invalid_nestings/node_in_copying.pl,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- t/results/invalid_nestings/node_in_copying.pl 3 Jul 2011 14:50:58
-0000 1.23
+++ t/results/invalid_nestings/node_in_copying.pl 2 Nov 2011 20:46:38
-0000 1.24
@@ -133,12 +133,12 @@
$result_errors{'node_in_copying'} = [
{
- 'error_line' => ':2: No matching address@hidden copying\'
+ 'error_line' => ':2: @node seen before @end copying
',
'file_name' => '',
'line_nr' => 2,
'macro' => '',
- 'text' => 'No matching address@hidden copying\'',
+ 'text' => '@node seen before @end copying',
'type' => 'error'
},
{
Index: t/results/invalid_nestings/node_in_copying_not_closed.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/invalid_nestings/node_in_copying_not_closed.pl,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- t/results/invalid_nestings/node_in_copying_not_closed.pl 19 Aug 2011
23:09:43 -0000 1.29
+++ t/results/invalid_nestings/node_in_copying_not_closed.pl 2 Nov 2011
20:46:38 -0000 1.30
@@ -271,12 +271,12 @@
$result_errors{'node_in_copying_not_closed'} = [
{
- 'error_line' => ':6: No matching address@hidden copying\'
+ 'error_line' => ':6: @node seen before @end copying
',
'file_name' => '',
'line_nr' => 6,
'macro' => '',
- 'text' => 'No matching address@hidden copying\'',
+ 'text' => '@node seen before @end copying',
'type' => 'error'
}
];
Index: t/results/invalid_nestings/section_in_table.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/invalid_nestings/section_in_table.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- t/results/invalid_nestings/section_in_table.pl 3 Sep 2011 10:29:33
-0000 1.9
+++ t/results/invalid_nestings/section_in_table.pl 2 Nov 2011 20:46:38
-0000 1.10
@@ -270,12 +270,12 @@
$result_errors{'section_in_table'} = [
{
- 'error_line' => ':4: No matching address@hidden table\'
+ 'error_line' => ':4: @section seen before @end table
',
'file_name' => '',
'line_nr' => 4,
'macro' => '',
- 'text' => 'No matching address@hidden table\'',
+ 'text' => '@section seen before @end table',
'type' => 'error'
},
{
- texinfo/tp TODO Texinfo/Parser.pm Texinfo/Conve...,
Patrice Dumas <=