texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Add TEXINFO_LANGUAGE_DIRECTORIES customization op


From: Patrice Dumas
Subject: branch master updated: Add TEXINFO_LANGUAGE_DIRECTORIES customization option
Date: Sun, 25 Aug 2024 11:09:11 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new dbf44eba95 Add TEXINFO_LANGUAGE_DIRECTORIES customization option
dbf44eba95 is described below

commit dbf44eba9554c9750caaddf56feee7c5d2bca58b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Aug 25 17:09:11 2024 +0200

    Add TEXINFO_LANGUAGE_DIRECTORIES customization option
    
    * tp/Texinfo/Convert/Converter.pm (%defaults),
    tp/Texinfo/Convert/HTML.pm (_load_htmlxref_files),
    tp/Texinfo/options_data.txt, tp/texi2any.pl ($cmdline_options): add
    TEXINFO_LANGUAGE_DIRECTORIES to replace the
    'texinfo_language_config_dirs' information passed directly to
    converters.
---
 ChangeLog                       | 11 +++++++++++
 tp/Texinfo/Convert/Converter.pm |  1 -
 tp/Texinfo/Convert/HTML.pm      |  6 +++---
 tp/Texinfo/options_data.txt     | 12 ++++++------
 tp/texi2any.pl                  | 11 ++++++-----
 5 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6f5b4cf435..cc0f500d44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-08-25  Patrice Dumas  <pertusus@free.fr>
+
+       Add TEXINFO_LANGUAGE_DIRECTORIES customization option
+
+       * tp/Texinfo/Convert/Converter.pm (%defaults),
+       tp/Texinfo/Convert/HTML.pm (_load_htmlxref_files),
+       tp/Texinfo/options_data.txt, tp/texi2any.pl ($cmdline_options): add
+       TEXINFO_LANGUAGE_DIRECTORIES to replace the
+       'texinfo_language_config_dirs' information passed directly to
+       converters.
+
 2024-08-03  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/Converter.pm (%common_converters_defaults),
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index fc08cdeff9..dad3c6687c 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -140,7 +140,6 @@ my %defaults = (
 # customization options instead.
 my %common_converters_defaults = (
   # Following are set in the main program
-  'texinfo_language_config_dirs' => undef,
   'converted_format'     => undef, # also in converter defaults, but
                                    # in general set by the caller
   # can be different from the converted_format, for example, epub3
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index b5596b4a4e..4a22f87f20 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -8724,9 +8724,9 @@ sub _load_htmlxref_files {
         unshift @htmlxref_dirs, File::Spec->catdir(
           $Texinfo::ModulePath::top_srcdir, 'tp', 't', 'input_files');
       }
-    } elsif ($self->{'texinfo_language_config_dirs'}
-             and @{$self->{'texinfo_language_config_dirs'}}) {
-      @htmlxref_dirs = @{$self->{'texinfo_language_config_dirs'}};
+    } elsif ($self->get_conf('TEXINFO_LANGUAGE_DIRECTORIES')
+       and scalar(@{$self->get_conf('TEXINFO_LANGUAGE_DIRECTORIES')}) > 0) {
+      @htmlxref_dirs = @{$self->get_conf('TEXINFO_LANGUAGE_DIRECTORIES')};
     }
     unshift @htmlxref_dirs, '.';
 
diff --git a/tp/Texinfo/options_data.txt b/tp/Texinfo/options_data.txt
index ce81d67e36..0ecce9d174 100644
--- a/tp/Texinfo/options_data.txt
+++ b/tp/Texinfo/options_data.txt
@@ -351,14 +351,14 @@ ACTIVE_ICONS                       converter_other undef  
 icons
 PASSIVE_ICONS                      converter_other undef   icons
 
 
-# set from command line.
+# set from command line or in main program.
 # --css-include
-CSS_FILES            array_cmdline  undef   bytes_string_list
+CSS_FILES                    array_cmdline  undef   bytes_string_list
 # --css-ref
-CSS_REFS             array_cmdline  undef   char_string_list
+CSS_REFS                     array_cmdline  undef   char_string_list
 # --if*
-EXPANDED_FORMATS     array_cmdline  undef   bytes_string_list
+EXPANDED_FORMATS             array_cmdline  undef   bytes_string_list
 # -I
-INCLUDE_DIRECTORIES  array_cmdline  undef   file_string_list
-
+INCLUDE_DIRECTORIES          array_cmdline  undef   file_string_list
+TEXINFO_LANGUAGE_DIRECTORIES array_cmdline  undef   file_string_list
 
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 643ed76c67..d8c6fcfbad 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -536,10 +536,15 @@ my @css_refs = ();
 my @include_dirs = ();
 my @expanded_formats = ();
 # note that CSS_FILES and INCLUDE_DIRECTORIES are not decoded when
-# read from the command line and should be binary strings
+# read from the command line and should be binary strings.
+# TEXINFO_LANGUAGE_DIRECTORIES is not actually read from the command
+# line, but it is still best to have it here, and it should also
+# contain binary strings.
 my $cmdline_options = { 'CSS_FILES' => \@css_files,
                         'CSS_REFS' => \@css_refs,
                         'INCLUDE_DIRECTORIES' => \@include_dirs,
+                        'TEXINFO_LANGUAGE_DIRECTORIES'
+                            => \@texinfo_language_config_dirs,
                         'EXPANDED_FORMATS' => \@expanded_formats };
 
 my $format = 'info';
@@ -1759,8 +1764,6 @@ while(@input_files) {
   # and Converters.
   $converter_options->{'output_format'} = $format;
   $converter_options->{'converted_format'} = $converted_format;
-  $converter_options->{'texinfo_language_config_dirs'}
-    = \@texinfo_language_config_dirs;
   unshift @{$converter_options->{'INCLUDE_DIRECTORIES'}},
           @prepended_include_directories;
 
@@ -1872,8 +1875,6 @@ while(@input_files) {
     # hand, the information of the format could be useful.  Not very
     # important as long as this information is not used.
     $sort_element_converter_options->{'converted_format'} = $converted_format;
-    $sort_element_converter_options->{'texinfo_language_config_dirs'}
-       = \@texinfo_language_config_dirs;
     unshift @{$sort_element_converter_options->{'INCLUDE_DIRECTORIES'}},
             @prepended_include_directories;
 



reply via email to

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