texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Indices.pm (setup_sortable_index_ent


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Indices.pm (setup_sortable_index_entries): use Unicode::Collate if possible if USE_UNICODE_COLLATION is undef.
Date: Mon, 29 Jan 2024 05:14:17 -0500

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 837832944d * tp/Texinfo/Indices.pm (setup_sortable_index_entries): use 
Unicode::Collate if possible if USE_UNICODE_COLLATION is undef.
837832944d is described below

commit 837832944d8654050ea571982f3602cd5d52977a
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jan 29 11:14:07 2024 +0100

    * tp/Texinfo/Indices.pm (setup_sortable_index_entries): use
    Unicode::Collate if possible if USE_UNICODE_COLLATION is undef.
    
    * tp/Texinfo/options_data.txt (TRACE_INCLUDES): reclassify as
    program_cmdline.
---
 ChangeLog                   |  8 ++++++++
 tp/Texinfo/Indices.pm       | 20 ++++++++++++--------
 tp/Texinfo/options_data.txt |  3 ++-
 3 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 64cb6a5104..58b40a3e84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-01-29  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Indices.pm (setup_sortable_index_entries): use
+       Unicode::Collate if possible if USE_UNICODE_COLLATION is undef.
+
+       * tp/Texinfo/options_data.txt (TRACE_INCLUDES): reclassify as
+       program_cmdline.
+
 2024-01-28  Patrice Dumas  <pertusus@free.fr>
 
        * tp/texi2any.pl, tp/t/init/redefine_need.init (my_need_formatting),
diff --git a/tp/Texinfo/Indices.pm b/tp/Texinfo/Indices.pm
index 09c583941b..b9322a1399 100644
--- a/tp/Texinfo/Indices.pm
+++ b/tp/Texinfo/Indices.pm
@@ -388,16 +388,20 @@ sub setup_sortable_index_entries($$$$$)
   #                   'UCA_Version' => 9,
   #                   'table' => 'allkeys-3.1.1.txt');
 
-  # Fall back to stub if Unicode::Collate not available.
+  my $use_unicode_collation
+    = $customization_information->get_conf('USE_UNICODE_COLLATION');
+
   my $collator;
-  eval { require Unicode::Collate; Unicode::Collate->import; };
-  my $unicode_collate_loading_error = $@;
-  if ($unicode_collate_loading_error eq ''
-        and $customization_information->get_conf('USE_UNICODE_COLLATION')) {
-    $collator = Unicode::Collate->new(%collate_options);
-  } else {
-    $collator = Texinfo::CollateStub->new();
+  if (!(defined($use_unicode_collation)
+        and !$use_unicode_collation)) {
+    eval { require Unicode::Collate; Unicode::Collate->import; };
+    my $unicode_collate_loading_error = $@;
+    if ($unicode_collate_loading_error eq '') {
+      $collator = Unicode::Collate->new(%collate_options);
+    }
   }
+  # Fall back to stub if Unicode::Collate not wanted or not available.
+  $collator = Texinfo::CollateStub->new() if (!defined($collator));
 
   my $entries_collator;
   $entries_collator = $collator if $preset_keys;
diff --git a/tp/Texinfo/options_data.txt b/tp/Texinfo/options_data.txt
index 5910c5191e..c78a4706db 100644
--- a/tp/Texinfo/options_data.txt
+++ b/tp/Texinfo/options_data.txt
@@ -141,6 +141,8 @@ FORCE           program_cmdline undef  integer
 NO_WARN         program_cmdline undef  integer
 # --silent.  Not used.  For completeness
 SILENT          program_cmdline undef  char
+# --trace-includes
+TRACE_INCLUDES  program_cmdline 0      integer
 
 # following also set in converters
 # --headers.  Modified by the format.
@@ -159,7 +161,6 @@ SHOW_BUILTIN_CSS_RULES       program_customization 0        
 integer
 SORT_ELEMENT_COUNT           program_customization undef     char
 SORT_ELEMENT_COUNT_WORDS     program_customization undef     integer
 TEXI2DVI                     program_customization texi2dvi  char
-TRACE_INCLUDES               program_customization 0         integer
 TREE_TRANSFORMATIONS         program_customization undef     char
 
 



reply via email to

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