texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Thu, 22 Feb 2024 17:38:21 -0500 (EST)

branch: master
commit d56c28fc9c757583a452d8029f374eff7a9d7d80
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Feb 22 23:35:59 2024 +0100

    * tp/Texinfo/ParserNonXS.pm (_parse_texi), tp/Texinfo/Translations.pm
    (complete_indices), tp/Texinfo/XS/parsetexi/indices.c
    (complete_indices), tp/Texinfo/XS/parsetexi/parser.c (parse_texi):
    pass debug_level as complete_indices argument.  Set debug_level in C
    for complete_indices based on debug_output.
---
 ChangeLog                         |  8 ++++++++
 tp/Texinfo/ParserNonXS.pm         |  3 ++-
 tp/Texinfo/Translations.pm        |  9 ++-------
 tp/Texinfo/XS/parsetexi/indices.c | 10 +++++-----
 tp/Texinfo/XS/parsetexi/indices.h |  2 +-
 tp/Texinfo/XS/parsetexi/parser.c  |  2 +-
 6 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 27b46f6c0a..c18bb23233 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-22  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/ParserNonXS.pm (_parse_texi), tp/Texinfo/Translations.pm
+       (complete_indices), tp/Texinfo/XS/parsetexi/indices.c
+       (complete_indices), tp/Texinfo/XS/parsetexi/parser.c (parse_texi):
+       pass debug_level as complete_indices argument.  Set debug_level in C
+       for complete_indices based on debug_output.
+
 2024-02-22  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/translations.c (gdt, gdt_tree, pgdt_tree)
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 62c4a0606f..fb0dcc8ca6 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -7513,7 +7513,8 @@ sub _parse_texi($$$)
   # Setup identifier target elements based on 'labels_list'
   Texinfo::Document::set_labels_identifiers_target($self,
                                               $self->{'registrar'}, $self);
-  Texinfo::Translations::complete_indices($self, $self->{'index_names'});
+  Texinfo::Translations::complete_indices($self->{'index_names'},
+                                          $self->{'DEBUG'});
 
   my $document = Texinfo::Document::register($root,
      $self->{'global_info'}, $self->{'index_names'}, $self->{'floats'},
diff --git a/tp/Texinfo/Translations.pm b/tp/Texinfo/Translations.pm
index 5651797494..a8e1617390 100644
--- a/tp/Texinfo/Translations.pm
+++ b/tp/Texinfo/Translations.pm
@@ -391,15 +391,10 @@ sub pgdt($$;$$$)
 # For some @def* commands, we delay storing the contents of the
 # index entry until now to avoid needing Texinfo::Translations::gdt
 # in the main code of ParserNonXS.pm.
-sub complete_indices($$)
+sub complete_indices($;$)
 {
-  my $customization_information = shift;
   my $index_names = shift;
-
-  my $debug_level;
-  if ($customization_information) {
-    $debug_level = $customization_information->get_conf('DEBUG');
-  }
+  my $debug_level = shift;
 
   foreach my $index_name (sort(keys(%{$index_names}))) {
     next if (not defined($index_names->{$index_name}->{'index_entries'}));
diff --git a/tp/Texinfo/XS/parsetexi/indices.c 
b/tp/Texinfo/XS/parsetexi/indices.c
index fc609c9f1c..82f183c0b2 100644
--- a/tp/Texinfo/XS/parsetexi/indices.c
+++ b/tp/Texinfo/XS/parsetexi/indices.c
@@ -374,7 +374,7 @@ resolve_indices_merged_in (void)
    Done in a separate function and not inside the main parser loop because
    it requires parsing Texinfo code in gdt_tree too */
 void
-complete_indices (int document_descriptor)
+complete_indices (int document_descriptor, int debug_level)
 {
   INDEX **i, *idx;
   DOCUMENT *document;
@@ -456,8 +456,8 @@ complete_indices (int document_descriptor)
                           || def_command == CM_deftypemethod)
                         {
                           index_entry = gdt_tree ("{name} on {class}",
-                                                  document,
-                                                  lang, substrings, 0, 0);
+                                                  document, lang, substrings,
+                                                  debug_level, 0);
 
                           text_append (&text_element->text, " on ");
                         }
@@ -467,8 +467,8 @@ complete_indices (int document_descriptor)
                                || def_command == CM_deftypecv)
                         {
                           index_entry = gdt_tree ("{name} of {class}",
-                                                  document, lang,
-                                                  substrings, 0, 0);
+                                                  document, lang, substrings,
+                                                  debug_level, 0);
 
                           text_append (&text_element->text, " of ");
                         }
diff --git a/tp/Texinfo/XS/parsetexi/indices.h 
b/tp/Texinfo/XS/parsetexi/indices.h
index 926acd8da3..ac7cd6d471 100644
--- a/tp/Texinfo/XS/parsetexi/indices.h
+++ b/tp/Texinfo/XS/parsetexi/indices.h
@@ -17,6 +17,6 @@ void set_non_ignored_space_in_index_before_command (ELEMENT 
*content);
 void forget_indices (void);
 
 void resolve_indices_merged_in (void);
-void complete_indices (int document_descriptor);
+void complete_indices (int document_descriptor, int debug_level);
 
 #endif
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index a8a22ff304..d9711a0412 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -2770,7 +2770,7 @@ parse_texi (ELEMENT *root_elt, ELEMENT *current_elt)
 
   document_descriptor = store_document(current);
 
-  complete_indices (document_descriptor);
+  complete_indices (document_descriptor, debug_output);
 
   return document_descriptor;
 }



reply via email to

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