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: Mon, 07 Nov 2011 22:19:21 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/11/07 22:19:21

Modified files:
        tp             : TODO texi2any.pl 
        tp/Texinfo     : Common.pm Structuring.pm 
        tp/Texinfo/Convert: Converter.pm 
        tp/t/init      : t2h_singular.init 

Log message:
        Warn when setting obsolete customization options.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.219&r2=1.220
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.86&r2=1.87
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.93&r2=1.94
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Structuring.pm?cvsroot=texinfo&r1=1.102&r2=1.103
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Converter.pm?cvsroot=texinfo&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/init/t2h_singular.init?cvsroot=texinfo&r1=1.4&r2=1.5

Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -b -r1.219 -r1.220
--- TODO        6 Nov 2011 19:17:57 -0000       1.219
+++ TODO        7 Nov 2011 22:19:20 -0000       1.220
@@ -13,16 +13,6 @@
 the subsection that is both below and next the section, because it is 
 next in menu.  Bug or not?
 
-(A) When there is a top node without sectioning command and USE_NODE is false
-and a sectioning command follows with an associated node:
-* the Top node ends up in the same element as the sectioning command and
-  second node
-* the node_up of the element is the Top node, the up for the element is 
-  therefore itself
-* the header appears at the same place as the Top node, but points up 
-  to the first sectioning element and the second node
-Example in sectioning/lone_Top_node.
-
 
 Delayed bugs
 ============

Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- texi2any.pl 7 Nov 2011 20:09:24 -0000       1.86
+++ texi2any.pl 7 Nov 2011 22:19:20 -0000       1.87
@@ -239,7 +239,7 @@
 # used in main program
 our $options = {};
 
-sub _load_config ($$) {
+sub _load_config($$) {
   $default_options = shift;
   $cmdline_options = shift;
   #print STDERR "cmdline_options: ".join('|',keys(%$cmdline_options))."\n";
@@ -255,12 +255,14 @@
   }
 }
 
-sub set_from_init_file ($$) {
+sub set_from_init_file($$) {
   my $var = shift;
   my $value = shift;
   if (!Texinfo::Common::valid_option($var)) {
     warn (sprintf(__('Unknown variable %s'), $var));
     return 0;
+  } elsif (Texinfo::Common::obsolete_option($var)) {
+    warn (sprintf(main::__("Obsolete variable %s\n"), $var));
   }
   return 0 if (defined($cmdline_options->{$var}));
   delete $default_options->{$var};
@@ -268,7 +270,7 @@
   return 1;
 }
 
-sub set_from_cmdline ($$) {
+sub set_from_cmdline($$) {
   my $var = shift;
   my $value = shift;
   delete $options->{$var};
@@ -276,6 +278,8 @@
   if (!Texinfo::Common::valid_option($var)) {
     warn (sprintf(main::__("Unknown variable %s\n"), $var));
     return 0;
+  } elsif (Texinfo::Common::obsolete_option($var)) {
+    warn (sprintf(main::__("Obsolete variable %s\n"), $var));
   }
   $cmdline_options->{$var} = $value;
   return 1;
@@ -347,15 +351,15 @@
   Texinfo::Config::_load_init_file($file);
 }
 
-sub set_from_cmdline ($$) {
+sub set_from_cmdline($$) {
   return &Texinfo::Config::set_from_cmdline(@_);
 }
 
-sub set_from_init_file ($$) {
+sub set_from_init_file($$) {
   return &Texinfo::Config::set_from_init_file(@_);
 }
 
-sub get_conf ($) {
+sub get_conf($) {
   return &Texinfo::Config::get_conf(@_);
 }
 
@@ -414,7 +418,7 @@
 }
 
 
-sub document_warn ($) {
+sub document_warn($) {
   return if (get_conf('NO_WARN'));
   my $text = shift;
   chomp ($text);

Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -b -r1.93 -r1.94
--- Texinfo/Common.pm   6 Nov 2011 17:48:54 -0000       1.93
+++ Texinfo/Common.pm   7 Nov 2011 22:19:20 -0000       1.94
@@ -114,7 +114,6 @@
   'ENCODING_NAME', 'PERL_ENCODING', 'INDICES', 'KBDINPUTSTYLE', 'LABELS',
   'MACROS', 'NOVALIDATE', 'SECTIONS_LEVEL', 'VALUES');
 
-# FIXME(Karl) warn when those variables are used?
 my @obsolete_variables = ('TOP_HEADING_AT_BEGINNING', 'USE_SECTIONS',
   'IDX_SUMMARY', 'I18N_PERL_HASH', 'USE_UNICODE', 'USE_NLS',
   'USE_UP_FOR_ADJACENT_NODES', 'SEPARATE_DESCRIPTION', 
@@ -174,12 +173,23 @@
   $valid_options{$var} = 1;
 }
 
+my %obsolete_options;
+foreach my $var (@obsolete_variables) {
+  $obsolete_options{$var} = 1;
+}
+
 sub valid_option($)
 {
   my $option = shift;
   return $valid_options{$option};
 }
 
+sub obsolete_option($)
+{
+  my $option = shift;
+  return $obsolete_options{$option};
+}
+
 our %no_brace_commands;             # commands never taking braces
 %no_brace_commands = (
            '*', "\n",

Index: Texinfo/Structuring.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Structuring.pm,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -b -r1.102 -r1.103
--- Texinfo/Structuring.pm      30 Oct 2011 23:03:32 -0000      1.102
+++ Texinfo/Structuring.pm      7 Nov 2011 22:19:20 -0000       1.103
@@ -246,7 +246,6 @@
               if ($content->{'cmdname'} eq 'part') {
                 $new_upper_element = 1;
                 if ($level < $up->{'level'}) {
-                  # FIXME(Karl) error message
                   $self->line_warn(sprintf($self->__(
                     "No chapter-level command before address@hidden"),
                           $content->{'cmdname'}), $content->{'line_nr'});
@@ -341,7 +340,7 @@
 }
 
 my @node_directions = ('next', 'prev', 'up');
-# FIXME(Karl) i18n?
+# No translation of those special Info keywords.
 my %direction_texts = (
  'prev' => 'Prev',
  'next' => 'Next',

Index: Texinfo/Convert/Converter.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Converter.pm,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- Texinfo/Convert/Converter.pm        6 Nov 2011 00:55:27 -0000       1.63
+++ Texinfo/Convert/Converter.pm        7 Nov 2011 22:19:20 -0000       1.64
@@ -328,6 +328,8 @@
   if (!Texinfo::Common::valid_option($conf)) {
     warn "BUG: unknown option $conf\n";
     return undef;
+  } elsif (Texinfo::Common::obsolete_option($conf)) {
+    warn (sprintf(main::__("Obsolete variable %s\n"), $conf));
   }
   if ($self->{'set'}->{$conf}) {
     return 0;
@@ -345,6 +347,8 @@
   if (!Texinfo::Common::valid_option($conf)) {
     warn "BUG: unknown option $conf\n";
     return undef;
+  } elsif (Texinfo::Common::obsolete_option($conf)) {
+    warn (sprintf(main::__("Obsolete variable %s\n"), $conf));
   }
   $self->{'conf'}->{$conf} = $value;
   return 1;

Index: t/init/t2h_singular.init
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/init/t2h_singular.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- t/init/t2h_singular.init    1 Nov 2011 12:01:32 -0000       1.4
+++ t/init/t2h_singular.init    7 Nov 2011 22:19:21 -0000       1.5
@@ -30,7 +30,8 @@
 set_from_init_file('VERBOSE', 1);
 
 # print index summary for 'cp' index
-set_from_init_file('IDX_SUMMARY', 'cp');
+# obsolete
+#set_from_init_file('IDX_SUMMARY', 'cp');
 
 my $T2H_SING_base_images = '../singular_images/';
 



reply via email to

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