[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo tp/Texinfo/Common.pm tp/Texinfo/Parser....
From: |
Patrice Dumas |
Subject: |
texinfo tp/Texinfo/Common.pm tp/Texinfo/Parser.... |
Date: |
Sun, 27 Mar 2011 14:20:25 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/03/27 14:20:25
Modified files:
tp/Texinfo : Common.pm Parser.pm
tp/Texinfo/Convert: Plaintext.pm
tp/t/results/invalid_nestings: center.pl
tp/t/results/plaintext_tests: at_commands_glued_in_example.pl
at_commands_glued_in_paragraph.pl
util : txicmdlist
Log message:
Add default index commands to the misc_commands hash.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.229&r2=1.230
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.127&r2=1.128
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/center.pl?cvsroot=texinfo&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/plaintext_tests/at_commands_glued_in_example.pl?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/plaintext_tests/at_commands_glued_in_paragraph.pl?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/util/txicmdlist?cvsroot=texinfo&r1=1.2&r2=1.3
Patches:
Index: tp/Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- tp/Texinfo/Common.pm 27 Mar 2011 08:24:55 -0000 1.25
+++ tp/Texinfo/Common.pm 27 Mar 2011 14:20:22 -0000 1.26
@@ -223,6 +223,29 @@
'allow-recursion' => 'skipline',
);
+# key is index name, keys of the reference value are the prefixes.
+# value associated with the prefix is 0 if the prefix is not a code-like
+# prefix, 1 if it is a code-like prefix (set by defcodeindex/syncodeindex).
+our %index_names = (
+ 'cp' => {'cp' => 0, 'c' => 0},
+ 'fn' => {'fn' => 1, 'f' => 1},
+ 'vr' => {'vr' => 1, 'v' => 1},
+ 'ky' => {'ky' => 1, 'k' => 1},
+ 'pg' => {'pg' => 1, 'p' => 1},
+ 'tp' => {'tp' => 1, 't' => 1}
+);
+
+our %default_index_commands;
+#Â all the commands are readded dynamically in the Parser.
+foreach my $index_name (keys (%index_names)) {
+ foreach my $index_prefix (keys (%{$index_names{$index_name}})) {
+ next if ($index_prefix eq $index_name);
+ #Â only put the one letter versions in the hash.
+ $misc_commands{$index_prefix.'index'} = 'line';
+ $default_index_commands{$index_prefix.'index'} = 1;
+ }
+}
+
# command with braces. Value is the max number of arguments.
our %brace_commands;
Index: tp/Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.229
retrieving revision 1.230
diff -u -b -r1.229 -r1.230
--- tp/Texinfo/Parser.pm 27 Mar 2011 08:24:55 -0000 1.229
+++ tp/Texinfo/Parser.pm 27 Mar 2011 14:20:23 -0000 1.230
@@ -427,14 +427,7 @@
# key is index name, keys of the reference value are the prefixes.
# value associated with the prefix is 0 if the prefix is not a code-like
# prefix, 1 if it is a code-like prefix (set by defcodeindex/syncodeindex).
-my %index_names = (
- 'cp' => {'cp' => 0,'c' => 0},
- 'fn' => {'fn' => 1, 'f' => 1},
- 'vr' => {'vr' => 1, 'v' => 1},
- 'ky' => {'ky' => 1, 'k' => 1},
- 'pg' => {'pg' => 1, 'p' => 1},
- 'tp' => {'tp' => 1, 't' => 1}
-);
+my %index_names = %Texinfo::Common::index_names;
# index names that cannot be set by the user.
my %forbidden_index_name = ();
Index: tp/Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -b -r1.127 -r1.128
--- tp/Texinfo/Convert/Plaintext.pm 24 Mar 2011 23:06:47 -0000 1.127
+++ tp/Texinfo/Convert/Plaintext.pm 27 Mar 2011 14:20:24 -0000 1.128
@@ -70,12 +70,6 @@
$informative_commands{$informative_command} = 1;
}
-foreach my $kept_command(keys (%informative_commands),
- 'verbatiminclude', 'insertcopying',
- 'listoffloats', 'printindex',
- 'contents', 'shortcontents', 'summarycontents') {
- $formatting_misc_commands{$kept_command} = 1;
-}
my %text_no_brace_commands = %Texinfo::Convert::Text::text_no_brace_commands;
my %text_brace_no_arg_commands =
%Texinfo::Convert::Text::text_brace_no_arg_commands;
my %accent_commands = %Texinfo::Common::accent_commands;
@@ -93,6 +87,15 @@
my @out_formats = @Texinfo::Common::out_formats;
my %code_style_commands = %Texinfo::Common::code_style_commands;
my %preformatted_code_commands = %Texinfo::Common::preformatted_code_commands;
+my %default_index_commands = %Texinfo::Common::default_index_commands;
+
+foreach my $kept_command(keys (%informative_commands),
+ keys (%default_index_commands),
+ 'verbatiminclude', 'insertcopying',
+ 'listoffloats', 'printindex',
+ 'contents', 'shortcontents', 'summarycontents') {
+ $formatting_misc_commands{$kept_command} = 1;
+}
foreach my $def_command (keys(%def_commands)) {
$formatting_misc_commands{$def_command} = 1 if
($misc_commands{$def_command});
Index: tp/t/results/invalid_nestings/center.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/invalid_nestings/center.pl,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- tp/t/results/invalid_nestings/center.pl 13 Mar 2011 22:01:23 -0000
1.30
+++ tp/t/results/invalid_nestings/center.pl 27 Mar 2011 14:20:24 -0000
1.31
@@ -1938,6 +1938,15 @@
$result_errors{'center'} = [
{
+ 'error_line' => ':3: warning: @cindex should only appear at a line
beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 3,
+ 'macro' => '',
+ 'text' => '@cindex should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':3: warning: @cindex should not appear in @center
',
'file_name' => '',
Index: tp/t/results/plaintext_tests/at_commands_glued_in_example.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/plaintext_tests/at_commands_glued_in_example.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- tp/t/results/plaintext_tests/at_commands_glued_in_example.pl 6 Mar
2011 23:20:36 -0000 1.1
+++ tp/t/results/plaintext_tests/at_commands_glued_in_example.pl 27 Mar
2011 14:20:24 -0000 1.2
@@ -716,6 +716,15 @@
$result_errors{'at_commands_glued_in_example'} = [
{
+ 'error_line' => ':15: warning: @cindex should only appear at a line
beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 15,
+ 'macro' => '',
+ 'text' => '@cindex should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':15: Entry for index `cp\' outside of any node
',
'file_name' => '',
Index: tp/t/results/plaintext_tests/at_commands_glued_in_paragraph.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/plaintext_tests/at_commands_glued_in_paragraph.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- tp/t/results/plaintext_tests/at_commands_glued_in_paragraph.pl 6 Mar
2011 23:20:36 -0000 1.1
+++ tp/t/results/plaintext_tests/at_commands_glued_in_paragraph.pl 27 Mar
2011 14:20:24 -0000 1.2
@@ -655,6 +655,15 @@
$result_errors{'at_commands_glued_in_paragraph'} = [
{
+ 'error_line' => ':14: warning: @cindex should only appear at a line
beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 14,
+ 'macro' => '',
+ 'text' => '@cindex should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
'error_line' => ':14: Entry for index `cp\' outside of any node
',
'file_name' => '',
Index: util/txicmdlist
===================================================================
RCS file: /sources/texinfo/texinfo/util/txicmdlist,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- util/txicmdlist 27 Mar 2011 08:24:56 -0000 1.2
+++ util/txicmdlist 27 Mar 2011 14:20:25 -0000 1.3
@@ -31,7 +31,7 @@
keys(%Texinfo::Common::brace_commands),
keys(%Texinfo::Common::misc_commands),
keys(%Texinfo::Common::no_brace_commands),
- qw(cindex findex kindex pindex tindex value vindex),
+ qw(value),
);
print map { "address@hidden" } sort (@all_commands);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo tp/Texinfo/Common.pm tp/Texinfo/Parser....,
Patrice Dumas <=