[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp texi2any.pl Texinfo/Common.pm Texinf...
From: |
Patrice Dumas |
Subject: |
texinfo/tp texi2any.pl Texinfo/Common.pm Texinf... |
Date: |
Fri, 21 Oct 2011 22:59:05 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/10/21 22:59:05
Modified files:
tp : texi2any.pl
tp/Texinfo : Common.pm Parser.pm
tp/Texinfo/Convert: HTML.pm
tp/init : tex4ht.pm
Log message:
Allow all the parser options to be set up in init files.
use get_value to access the values from the parser.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.75&r2=1.76
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.77&r2=1.78
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.318&r2=1.319
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.188&r2=1.189
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/init/tex4ht.pm?cvsroot=texinfo&r1=1.4&r2=1.5
Patches:
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- texi2any.pl 21 Oct 2011 18:42:36 -0000 1.75
+++ texi2any.pl 21 Oct 2011 22:59:05 -0000 1.76
@@ -670,7 +670,7 @@
},
'no-warn' => sub { set_from_cmdline('NO_WARN', $_[1]); },
# FIXME pass to parser? What could it mean in parser?
- 'verbose|v' => sub {set_from_cmdline('VERBOSE', $_[1]);
+ 'verbose|v!' => sub {set_from_cmdline('VERBOSE', $_[1]);
push @texi2dvi_args, '--verbose'; },
'document-language=s' => sub {
set_from_cmdline('documentlanguage', $_[1]);
@@ -861,6 +861,11 @@
if (defined(get_conf($parser_settable_option)));
}
+foreach my $parser_option (@Texinfo::Common::parser_options) {
+ $parser_default_options->{lc($parser_option)} = get_conf($parser_option)
+ if (defined(get_conf($parser_option)));
+}
+
# Main processing, process all the files given on the command line
Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -b -r1.77 -r1.78
--- Texinfo/Common.pm 20 Oct 2011 20:51:07 -0000 1.77
+++ Texinfo/Common.pm 21 Oct 2011 22:59:05 -0000 1.78
@@ -107,6 +107,12 @@
'BATCH', 'SILENT'
);
+# documented as pod
+our @parser_options = ('EXPANDED_FORMATS', 'GETTEXT', 'INCLUDE_DIRECTORIES',
+ 'ALIASES', 'CLICKSTYLE', 'DOCUMENTLANGUAGE', 'EXPLAINED_COMMANDS',
+ 'ENCODING_NAME', 'PERL_ENCODING', 'INDICES', 'KBDINPUTSTYLE', 'LABELS',
+ 'MACROS', 'NOVALIDATE', 'SECTIONS_LEVEL', 'VALUES');
+
# FIXME TOP_HEADING_AT_BEGINNING seems to be a no-op
# FIXME USE_SECTIONS is now a no-op, there are only two possibilities,
# USE_NODES set or not.
@@ -154,7 +160,7 @@
my %valid_options;
foreach my $var (@document_settable_at_commands, @document_global_at_commands,
- @command_line_settables, @variable_settables) {
+ @command_line_settables, @variable_settables, @parser_options) {
$valid_options{$var} = 1;
}
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.318
retrieving revision 1.319
diff -u -b -r1.318 -r1.319
--- Texinfo/Parser.pm 20 Oct 2011 20:51:07 -0000 1.318
+++ Texinfo/Parser.pm 21 Oct 2011 22:59:05 -0000 1.319
@@ -5000,7 +5000,7 @@
conditional blocks should be expanded. Default is empty.
The raw block formats (within C<@html> blocks, for example) are
-alwyas kept.
+always kept.
=item gettext
@@ -5011,7 +5011,7 @@
=item GLOBAL_COMMANDS
The associated value is a reference on an array. All the commands in the
-array are collected durin parsing. They are afterwards available
+array are collected during parsing. They are afterwards available
through L</global_informations>.
=item include_directories
Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -b -r1.188 -r1.189
--- Texinfo/Convert/HTML.pm 19 Oct 2011 19:49:26 -0000 1.188
+++ Texinfo/Convert/HTML.pm 21 Oct 2011 22:59:05 -0000 1.189
@@ -586,6 +586,18 @@
return $self->{'default_formatting_functions'}->{$format};
}
+sub get_value($$)
+{
+ my $self = shift;
+ my $value = shift;
+ if (defined($self->{'parser'})
+ and exists ($self->{'parser'}->{'values'}->{$value})) {
+ return $self->{'parser'}->{'values'}->{$value};
+ } else {
+ return undef;
+ }
+}
+
# see http://www.w3.org/TR/REC-html40/types.html#type-links
my %BUTTONS_REL =
(
Index: init/tex4ht.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/init/tex4ht.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- init/tex4ht.pm 18 Oct 2011 18:47:22 -0000 1.4
+++ init/tex4ht.pm 21 Oct 2011 22:59:05 -0000 1.5
@@ -23,13 +23,13 @@
#
#-##############################################################################
# To customize the command and the options, you could set
-# $Texi2HTML::TeX4HT::STYLE_MATH to latex/tex
-# $Texi2HTML::TeX4HT::STYLE_TEX to latex/texi
+# $Texinfo::TeX4HT::STYLE_MATH to latex/tex
+# $Texinfo::TeX4HT::STYLE_TEX to latex/texi
# and/or change
-# $Texi2HTML::TeX4HT::tex4ht_command_math
-# and $Texi2HTML::TeX4HT::tex4ht_options_math
-# $Texi2HTML::TeX4HT::tex4ht_command_tex
-# and $Texi2HTML::TeX4HT::tex4ht_options_tex
+# $Texinfo::TeX4HT::tex4ht_command_math
+# and $Texinfo::TeX4HT::tex4ht_options_math
+# $Texinfo::TeX4HT::tex4ht_command_tex
+# and $Texinfo::TeX4HT::tex4ht_options_tex
use strict;
- texinfo/tp texi2any.pl Texinfo/Common.pm Texinf..., Patrice Dumas, 2011/10/02
- texinfo/tp texi2any.pl Texinfo/Common.pm Texinf..., Patrice Dumas, 2011/10/08
- texinfo/tp texi2any.pl Texinfo/Common.pm Texinf..., Patrice Dumas, 2011/10/10
- texinfo/tp texi2any.pl Texinfo/Common.pm Texinf..., Patrice Dumas, 2011/10/11
- texinfo/tp texi2any.pl Texinfo/Common.pm Texinf...,
Patrice Dumas <=
- texinfo/tp texi2any.pl Texinfo/Common.pm Texinf..., Patrice Dumas, 2011/10/29
- texinfo/tp texi2any.pl Texinfo/Common.pm Texinf..., Patrice Dumas, 2011/10/30