[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Parser.pm Texinfo/Convert/Pl...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Parser.pm Texinfo/Convert/Pl... |
Date: |
Sun, 27 Feb 2011 12:07:01 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/02/27 12:06:59
Modified files:
tp/Texinfo : Parser.pm
tp/Texinfo/Convert: Plaintext.pm
tp/t : 30sectioning.t
tp/t/results/sectioning: at_commands_in_refs.pl
character_and_spaces_in_node.pl
character_and_spaces_in_refs.pl
some_at_commands_in_ref_nodes.pl
tp/t/results/value_and_macro: value_in_macro_body.pl
Log message:
Add a name to ref when there is a manual argument.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.210&r2=1.211
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.96&r2=1.97
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/30sectioning.t?cvsroot=texinfo&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/at_commands_in_refs.pl?cvsroot=texinfo&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/character_and_spaces_in_node.pl?cvsroot=texinfo&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/character_and_spaces_in_refs.pl?cvsroot=texinfo&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/some_at_commands_in_ref_nodes.pl?cvsroot=texinfo&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/value_and_macro/value_in_macro_body.pl?cvsroot=texinfo&r1=1.19&r2=1.20
Patches:
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -b -r1.210 -r1.211
--- Texinfo/Parser.pm 26 Feb 2011 15:10:20 -0000 1.210
+++ Texinfo/Parser.pm 27 Feb 2011 12:06:54 -0000 1.211
@@ -1533,7 +1533,8 @@
if (defined($args_index->{$arg})) {
$result .= $args->[$args_index->{$arg}];
} else {
- $self->line_error (sprintf($self->__("\\ in macro expansion followed
`%s' instead of parameter name or \\"), $arg), $line_nr);
+ $self->line_error (sprintf($self->__("\\ in address@hidden expansion
followed `%s' instead of parameter name or \\"),
+ $macro->{'args'}->[0]->{'text'}, $arg), $line_nr);
$result .= '\\' . $arg;
}
}
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -b -r1.96 -r1.97
--- Texinfo/Convert/Plaintext.pm 26 Feb 2011 11:16:56 -0000 1.96
+++ Texinfo/Convert/Plaintext.pm 27 Feb 2011 12:06:55 -0000 1.97
@@ -1502,6 +1502,12 @@
# FIXME this is a bit strange.
$file = [{'text' => '()'}];
}
+ #Â FIXME why define the name if there is a file argument?
+ if ($file and !$name) {
+ @$name = ({'type' => 'code',
+ 'contents' => $args[0]});
+ }
+
if ($name) {
push @contents, (@$name, {'text' => ': '});
if ($file) {
Index: t/30sectioning.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/30sectioning.t,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- t/30sectioning.t 24 Feb 2011 01:24:06 -0000 1.21
+++ t/30sectioning.t 27 Feb 2011 12:06:56 -0000 1.22
@@ -93,104 +93,6 @@
@anchor{0}.
@xref{0}.
-']
-);
-
-my @test_cases = (
-[ 'node',
-'
address@hidden one arg1
address@hidden one arg2, two arg
address@hidden one arg3, two arg, three arg
address@hidden one arg4, two arg, three arg, four arg
address@hidden one arg5, two arg, three arg, four arg, five arg
-
address@hidden comment @comment
-
address@hidden arg1 @comma{} arg2, @,cedilla, @strong{comma in strong,} @c
comma , end
-'],
-['space_in_node',
-'
address@hidden Top
-
address@hidden
-* Chap first here::
-* Test title :Test title.
address@hidden menu
-
address@hidden Chap first here
-
address@hidden Test title
-'],
-['empty_nodes_with_commands',
-'
address@hidden @c comment
-
address@hidden @
address@hidden @:
address@hidden @asis{ }
-'],
-['sections',
-'@chapter a chapter
-'],
-['unnumbered_no_argument',
-'@unnumbered
-'],
-['a_comma_after_node',
-'@node Commands, Requirements, Nodes and Menus
-
-A comma in text, end.
-'],
-['nodename_parentheses',
-'@node Top
address@hidden The top node
-
address@hidden
-* Node (with parentheses)::
-* Other node::
-* (manual)node::
address@hidden menu
-
address@hidden Node (with parentheses)
address@hidden Section (nodename with parentheses)
-
-Dummy section
-
address@hidden Other node
address@hidden Section (nodename without parentheses)
-
-Dummy link to @ref{Node (with parentheses)}.
-
-Dummy link to @ref{(manual)node}.
-
address@hidden (manual)node
address@hidden (manual)node
-
-Dummy section with (manual)node node syntax.
-
address@hidden(manual)anchor}.
-
-'],
-['node_empty_direction',
-'@node name, '
-],
-['character_and_spaces_in_node',
-'
address@hidden Top
address@hidden other nodes, !_"#$%&\'()*+-., Top, Top
address@hidden !_"#$%&\'()*+-., /;<=>?[\\]^_`|~, other nodes, other nodes
address@hidden /;<=>?[\\]^_`|~,local node,!_"#$%&\'()*+-., other nodes
address@hidden local node,,/;<=>?[\\]^_`|~,other nodes
-'],
-['at_commands_in_node',
-'@node A @sc{sc} node @"i @"address@hidden @address@hidden @l{}
@,address@hidden'C} @exclamdown{}'
-],
-['unknown_node_in_menu',
-'@node Top
-
address@hidden
-* unknown::
address@hidden menu
'],
['character_and_spaces_in_refs',
'@node Top
@@ -207,6 +109,9 @@
@ref{ top ,,, manual}
@ref{(texinfo)Cross References}
@ref{node,,, ../manual/doc.texi}
+
address@hidden Testing local nodes
+
@ref{!_"#$%&\'()*+-.}
@ref{/;<=>?[\\]^_`|~}
@ref{ Top}
@@ -229,6 +134,14 @@
@bye
'],
+['character_and_spaces_in_node',
+'
address@hidden Top
address@hidden other nodes, !_"#$%&\'()*+-., Top, Top
address@hidden !_"#$%&\'()*+-., /;<=>?[\\]^_`|~, other nodes, other nodes
address@hidden /;<=>?[\\]^_`|~,local node,!_"#$%&\'()*+-., other nodes
address@hidden local node,,/;<=>?[\\]^_`|~,other nodes
+'],
['some_at_commands_in_ref_nodes',
'
@node Top
@@ -386,6 +299,96 @@
@bye
'],
+);
+
+my @test_cases = (
+[ 'node',
+'
address@hidden one arg1
address@hidden one arg2, two arg
address@hidden one arg3, two arg, three arg
address@hidden one arg4, two arg, three arg, four arg
address@hidden one arg5, two arg, three arg, four arg, five arg
+
address@hidden comment @comment
+
address@hidden arg1 @comma{} arg2, @,cedilla, @strong{comma in strong,} @c
comma , end
+'],
+['space_in_node',
+'
address@hidden Top
+
address@hidden
+* Chap first here::
+* Test title :Test title.
address@hidden menu
+
address@hidden Chap first here
+
address@hidden Test title
+'],
+['empty_nodes_with_commands',
+'
address@hidden @c comment
+
address@hidden @
address@hidden @:
address@hidden @asis{ }
+'],
+['at_commands_in_node',
+'@node A @sc{sc} node @"i @"address@hidden @address@hidden @l{}
@,address@hidden'C} @exclamdown{}'
+],
+['sections',
+'@chapter a chapter
+'],
+['unnumbered_no_argument',
+'@unnumbered
+'],
+['a_comma_after_node',
+'@node Commands, Requirements, Nodes and Menus
+
+A comma in text, end.
+'],
+['nodename_parentheses',
+'@node Top
address@hidden The top node
+
address@hidden
+* Node (with parentheses)::
+* Other node::
+* (manual)node::
address@hidden menu
+
address@hidden Node (with parentheses)
address@hidden Section (nodename with parentheses)
+
+Dummy section
+
address@hidden Other node
address@hidden Section (nodename without parentheses)
+
+Dummy link to @ref{Node (with parentheses)}.
+
+Dummy link to @ref{(manual)node}.
+
address@hidden (manual)node
address@hidden (manual)node
+
+Dummy section with (manual)node node syntax.
+
address@hidden(manual)anchor}.
+
+'],
+['node_empty_direction',
+'@node name, '
+],
+['unknown_node_in_menu',
+'@node Top
+
address@hidden
+* unknown::
address@hidden menu
+'],
['ref_to_unknown_node',
'@xref{unknown node}.'],
['raiselowersections',
Index: t/results/sectioning/at_commands_in_refs.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/sectioning/at_commands_in_refs.pl,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- t/results/sectioning/at_commands_in_refs.pl 20 Feb 2011 12:18:39 -0000
1.30
+++ t/results/sectioning/at_commands_in_refs.pl 27 Feb 2011 12:06:57 -0000
1.31
@@ -19537,4 +19537,308 @@
$result_errors{'at_commands_in_refs'} = [];
+
+$result_converted{'info'}->{'at_commands_in_refs'} = 'This is , produced by
makeinfo version 4.13 from .
+
+
+File: , Node: Top, Next: { }, Up: (dir)
+
+Top
+***
+
+* Menu:
+
+* { }::
+* !
+ . . ? @::
+* LaTeX TeX * , (C) ... ...::
+* == error--> Euro ! ==> -::
+* >= <= ->::
+* a o -!- # -| ? (R)::
+* => o a b aa::
+* AA ae oe AE OE /o /O ss /l /L D d TH th::
+* a" e~ i^ a^ a` e\' c, e= e* e\'\' e;::
+* e. e( e_ .e e< j ee[::
+* `` \'\' ` \' ,, ,::
+* << >> << >> < >::
+* `` \'\' --- --::
+* AAA (fff) AAA BBB::
+* CCC (rrr) CCC DDD::
+* the someone <address@hidden> <address@hidden>::
+* [image src="f--ile.png" alt="alt" text="[Image
description\\"\\"\\\\.]"