texinfo-commits
[Top][All Lists]
Advanced

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

texinfo tp/Texinfo/Common.pm util/txicustomvars


From: Patrice Dumas
Subject: texinfo tp/Texinfo/Common.pm util/txicustomvars
Date: Tue, 14 Aug 2012 07:38:22 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        12/08/14 07:38:22

Modified files:
        tp/Texinfo     : Common.pm 
Added files:
        util           : txicustomvars 

Log message:
        Add a new script that prints the customization variables, idea if Karl.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.149&r2=1.150
http://cvs.savannah.gnu.org/viewcvs/texinfo/util/txicustomvars?cvsroot=texinfo&rev=1.1

Patches:
Index: tp/Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -b -r1.149 -r1.150
--- tp/Texinfo/Common.pm        10 Aug 2012 21:56:50 -0000      1.149
+++ tp/Texinfo/Common.pm        14 Aug 2012 07:38:21 -0000      1.150
@@ -230,6 +230,35 @@
   return $obsolete_options{$option};
 }
 
+my %customization_variable_classes = (
+  'document_settable_at_commands' => address@hidden,
+  'document_settable_unique_at_commands' => address@hidden,
+  'command_line_settables' => address@hidden,
+  'variable_string_settables' => address@hidden,
+  'variable_other_settables' => address@hidden,
+  'parser_options' => address@hidden,
+  'formats_settable' => address@hidden,
+  'obsolete_variables' => address@hidden,
+  'variable_settables_not_used' => address@hidden,
+);
+
+my @secondary_customization_variables = (
+  'obsolete_variables', 'variable_settables_not_used'
+);
+sub _customization_variable_classes(;$)
+{
+  my $print_all = shift;
+  my $result = '';
+  foreach my $type (sort(keys(%customization_variable_classes))) {
+    next if (!$print_all 
+             and grep {$_ eq $type} @secondary_customization_variables);
+    foreach my $variable (@{$customization_variable_classes{$type}}) {
+      $result .= "$variable\t$type\n";
+    }
+  }
+  return $result;
+}
+
 my %valid_tree_transformations;
 foreach my $valid_transformation ('simple_menus', 
     'fill_gaps_in_sectioning', 'move_index_entries_after_items',

Index: util/txicustomvars
===================================================================
RCS file: util/txicustomvars
diff -N util/txicustomvars
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ util/txicustomvars  14 Aug 2012 07:38:21 -0000      1.1
@@ -0,0 +1,32 @@
+#!/usr/bin/env perl
+# $Id: txicustomvars,v 1.1 2012/08/14 07:38:21 pertusus Exp $
+# Copyright 2012 Free Software Foundation, Inc.
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License,
+# or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Original author: Patrice Dumas.
+#
+# Output Texinfo customization variables
+
+use strict;
+
+BEGIN {
+  (my $mydir = $0) =~ s,/[^/]+$,,;
+  chomp (my $tpdir = `cd $mydir/../tp && pwd`);
+  unshift (@INC, $tpdir);
+}
+
+use Texinfo::Common;
+
+print Texinfo::Common::_customization_variable_classes();



reply via email to

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