[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo Common.pm Parser.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo Common.pm Parser.pm |
Date: |
Mon, 21 Jan 2013 00:42:58 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 13/01/21 00:42:57
Modified files:
tp/Texinfo : Common.pm Parser.pm
Log message:
Turn document_settable_at_commands and
document_settable_unique_at_commands
into hash with associated values being the default values.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.171&r2=1.172
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.411&r2=1.412
Patches:
Index: Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -b -r1.171 -r1.172
--- Common.pm 16 Jan 2013 22:02:29 -0000 1.171
+++ Common.pm 21 Jan 2013 00:42:57 -0000 1.172
@@ -138,31 +138,48 @@
# texi2dvi --command
# customization options
-our @document_settable_at_commands =
- (
- 'allowcodebreaks', 'clickstyle', 'codequotebacktick',
- 'codequoteundirected', 'contents', 'deftypefnnewline',
- 'documentencoding', 'documentlanguage', 'exampleindent',
- 'firstparagraphindent', 'frenchspacing', 'headings',
- 'kbdinputstyle', 'paragraphindent',
- 'shortcontents', 'urefbreakstyle', 'xrefautomaticsectiontitle',
- );
+our %document_settable_at_commands = (
+ 'allowcodebreaks' => 'true',
+ 'clickstyle' => '@arrow',
+ 'codequotebacktick' => 'off',
+ 'codequoteundirected' => 'off',
+ 'contents' => 0,
+ 'deftypefnnewline' => 'off',
+ 'documentencoding' => 'us-ascii',
+ 'documentlanguage' => 'en',
+ # is N ems in TeX, 0.4 in.
+ 'exampleindent' => 5,
+ 'firstparagraphindent' => 'none',
+ 'frenchspacing' => 'off',
+ 'headings' => 'on',
+ 'kbdinputstyle' => 'distinct',
+ 'paragraphindent' => 3,
+ 'shortcontents' => 0,
+ 'urefbreakstyle' => 'after',
+ 'xrefautomaticsectiontitle' => 'off',
+);
# those should be unique
-our @document_settable_unique_at_commands = (
- # when passed through a configuration variable, this should be
- # already formatted for HTML
- 'documentdescription',
- 'evenfootingmarks', 'evenheadingmarks',
- 'everyfootingmarks', 'everyheadingmarks',
- 'fonttextsize', 'footnotestyle', 'novalidate',
- 'oddfootingmarks','oddheadingmarks',
- 'pagesizes', 'setchapternewpage',
- 'setcontentsaftertitlepage',
- 'setfilename',
- 'setshortcontentsaftertitlepage',
- );
-
+our %document_settable_unique_at_commands = (
+ # when passed through a configuration variable, documentdescription
+ # should be already formatted for HTML
+ 'documentdescription' => undef,
+ 'evenfootingmarks' => undef,
+ 'evenheadingmarks' => undef,
+ 'everyfootingmarks' => 'bottom',
+ 'everyheadingmarks' => 'bottom',
+ 'fonttextsize' => 11,
+ 'footnotestyle' => 'end',
+ 'novalidate' => 0,
+ 'oddfootingmarks' => undef,
+ 'oddheadingmarks' => undef,
+ # FIXME not clear here.
+ 'pagesizes' => undef,
+ 'setchapternewpage' => 'on',
+ 'setcontentsaftertitlepage' => 0,
+ 'setfilename' => undef,
+ 'setshortcontentsaftertitlepage' => 0,
+);
my @command_line_settables = ('FILLCOLUMN', 'SPLIT', 'SPLIT_SIZE',
'HEADERS',
@@ -253,8 +270,8 @@
);
my %valid_options;
-foreach my $var (@document_settable_at_commands,
- @document_settable_unique_at_commands,
+foreach my $var (keys(%document_settable_at_commands),
+ keys(%document_settable_unique_at_commands),
@command_line_settables, @variable_string_settables,
@variable_other_settables, @parser_options,
@formats_settable,
@@ -280,8 +297,8 @@
}
my %customization_variable_classes = (
- 'document_settable_at_commands' => address@hidden,
- 'document_settable_unique_at_commands' => address@hidden,
+ 'document_settable_at_commands' => [
sort(keys(%document_settable_at_commands)) ],
+ 'document_settable_unique_at_commands' => [
sort(keys(%document_settable_unique_at_commands)) ],
'command_line_settables' => address@hidden,
'variable_string_settables' => address@hidden,
'variable_other_settables' => address@hidden,
Index: Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.411
retrieving revision 1.412
diff -u -b -r1.411 -r1.412
--- Parser.pm 20 Jan 2013 16:45:28 -0000 1.411
+++ Parser.pm 21 Jan 2013 00:42:57 -0000 1.412
@@ -272,15 +272,15 @@
foreach my $global_multiple_command (
'author', 'footnote', 'hyphenation', 'insertcopying', 'printindex',
'subtitle','titlefont',
- @Texinfo::Common::document_settable_at_commands, ) {
+ keys(%Texinfo::Common::document_settable_at_commands), ) {
$global_multiple_commands{$global_multiple_command} = 1;
}
my %global_unique_commands;
foreach my $global_unique_command (
- 'copying', 'documentdescription', 'settitle',
+ 'copying', 'settitle',
'shorttitlepage', 'title', 'titlepage', 'top',
- @Texinfo::Common::document_settable_unique_at_commands, ) {
+ keys(%Texinfo::Common::document_settable_unique_at_commands), ) {
$global_unique_commands{$global_unique_command} = 1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp/Texinfo Common.pm Parser.pm,
Patrice Dumas <=