texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/tp TODO texi2any.pl Texinfo/Common.pm T...


From: Patrice Dumas
Subject: texinfo/tp TODO texi2any.pl Texinfo/Common.pm T...
Date: Sat, 18 Aug 2012 15:59:55 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        12/08/18 15:59:55

Modified files:
        tp             : TODO texi2any.pl 
        tp/Texinfo     : Common.pm Parser.pm 

Log message:
        Don't set parser defaults for converters that don't have a converter.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.289&r2=1.290
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.134&r2=1.135
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.151&r2=1.152
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.386&r2=1.387

Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -b -r1.289 -r1.290
--- TODO        13 Aug 2012 21:31:04 -0000      1.289
+++ TODO        18 Aug 2012 15:59:55 -0000      1.290
@@ -6,7 +6,7 @@
 ===================
 
 Document TEXTCONTENT_COMMENT, 'XREF_USE_FLOAT_LABEL', 'XREF_USE_NODE_NAME_ARG'
-DEBUGCOUNT
+DEBUGCOUNT, IGNORE_LEADING_SPACE_IN_MACRO_BODY
 
 For XREF_USE_NODE_NAME_ARG, the values may be 1 (always), 0 (never) or 
 undef (only if in preformatted).

Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -b -r1.134 -r1.135
--- texi2any.pl 10 Aug 2012 21:56:50 -0000      1.134
+++ texi2any.pl 18 Aug 2012 15:59:55 -0000      1.135
@@ -545,7 +545,7 @@
       --no-warn               suppress warnings (but not errors).
       --conf-dir=DIR          search also for initialization files in DIR.
       --init-file=FILE        load FILE to modify the default behavior.
-      --set-customization-variable VAR=VAL  set configuration variable VAR 
+      --set-customization-variable VAR=VAL  set customization variable VAR 
                                 to VAL.
   -v, --verbose               explain what is being done.
       --version               display version information and exit.\n"), 
get_conf('ERROR_LIMIT'))
@@ -937,21 +937,27 @@
     unless (grep {$_ eq $format} 
@{$parser_default_options->{'expanded_formats'}});
 }
 
+my $converter_class;
+my %converter_defaults;
 # This gets the class right, even though there is a sub...
-my $converter_class = ref(&{$formats_table{$format}->{'converter'}});
-my %converter_defaults = $converter_class->converter_defaults();
+if (defined($formats_table{$format}->{'converter'})) {
+  $converter_class = ref(&{$formats_table{$format}->{'converter'}});
+  %converter_defaults = $converter_class->converter_defaults();
+}
 
 # FIXME should this be set when the --set is set too?  The corresponding
 # code is ready above, but commented out.
-foreach my $parser_settable_option ('TOP_NODE_UP', 'MAX_MACRO_CALL_NESTING',
-                                    'INLINE_INSERTCOPYING', 'SHOW_MENU',
-                                    'IGNORE_BEFORE_SETFILENAME', 'TEST',
+# FIXME should the list come from Texinfo::Common
+foreach my $parser_settable_option (
+       'TOP_NODE_UP', 'MAX_MACRO_CALL_NESTING', 'INLINE_INSERTCOPYING', 
+       'SHOW_MENU', 'IGNORE_BEFORE_SETFILENAME', 'TEST', 
                                     'GLOBAL_COMMANDS', 'CPP_LINE_DIRECTIVES',
-                                    'USE_UP_NODE_FOR_ELEMENT_UP') {
+       'IGNORE_LEADING_SPACE_IN_MACRO_BODY', 'USE_UP_NODE_FOR_ELEMENT_UP') {
   if (defined(get_conf($parser_settable_option))) {
     $parser_default_options->{$parser_settable_option} 
        = get_conf($parser_settable_option);
-  } elsif (defined($converter_defaults{$parser_settable_option})) {
+  } elsif (defined($converter_class) 
+           and defined($converter_defaults{$parser_settable_option})) {
     $parser_default_options->{$parser_settable_option} 
        = $converter_defaults{$parser_settable_option};
   }

Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -b -r1.151 -r1.152
--- Texinfo/Common.pm   17 Aug 2012 23:39:54 -0000      1.151
+++ Texinfo/Common.pm   18 Aug 2012 15:59:55 -0000      1.152
@@ -94,7 +94,7 @@
 # FIXME maybe this should better be set as texinfo passed to texi2any as
 # texi2dvi --command 
 
-# configuration options
+# customization options
 our @document_settable_at_commands =
        (
         'allowcodebreaks', 'clickstyle', 'codequotebacktick',

Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.386
retrieving revision 1.387
diff -u -b -r1.386 -r1.387
--- Texinfo/Parser.pm   17 Aug 2012 23:39:55 -0000      1.386
+++ Texinfo/Parser.pm   18 Aug 2012 15:59:55 -0000      1.387
@@ -618,7 +618,7 @@
           $parser->{'set'}->{$key} = $parser->{$key};
         }
       } else {
-        warn "$key not a possible configuration in Texinfo::Parser::parser\n";
+        warn "$key not a possible customization in Texinfo::Parser::parser\n";
       }
     }
   }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]