texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Translations.pm (complete_indices) (


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Translations.pm (complete_indices) (_non_bracketed_contents): fix _non_bracketed_contents by using 'bracketed_arg' as the type, to match with the type on @def* lines. But do not call _non_bracketed_contents as it is not clear that it is better to avoid the 'bracketed_arg' type.
Date: Fri, 10 Mar 2023 14:18:19 -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 72c4f13b51 * tp/Texinfo/Translations.pm (complete_indices) 
(_non_bracketed_contents): fix _non_bracketed_contents by using 'bracketed_arg' 
as the type, to match with the type on @def* lines. But do not call 
_non_bracketed_contents as it is not clear that it is better to avoid the 
'bracketed_arg' type.
72c4f13b51 is described below

commit 72c4f13b51f61127610a6adf9bd8a4205f68f272
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Mar 10 20:18:03 2023 +0100

    * tp/Texinfo/Translations.pm (complete_indices)
    (_non_bracketed_contents): fix _non_bracketed_contents by using
    'bracketed_arg' as the type, to match with the type on @def* lines.
    But do not call _non_bracketed_contents as it is not clear that it is
    better to avoid the 'bracketed_arg' type.
---
 ChangeLog                  |  8 ++++++++
 tp/Texinfo/Translations.pm | 23 +++++++++++++----------
 2 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 66e6e6d61d..798ca0f75b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-03-10  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Translations.pm (complete_indices)
+       (_non_bracketed_contents): fix _non_bracketed_contents by using
+       'bracketed_arg' as the type, to match with the type on @def* lines.
+       But do not call _non_bracketed_contents as it is not clear that it is
+       better to avoid the 'bracketed_arg' type.
+
 2023-03-10  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/Texinfo.pm (convert_to_texinfo),
diff --git a/tp/Texinfo/Translations.pm b/tp/Texinfo/Translations.pm
index 4d979c16ad..364cf6f9d6 100644
--- a/tp/Texinfo/Translations.pm
+++ b/tp/Texinfo/Translations.pm
@@ -351,13 +351,14 @@ sub pgdt($$$;$$$)
   return $self->gdt($string, $replaced_substrings, $translation_context, 
$type, $lang);
 }
 
-
+# FIXME currently not used.  See below how it could be used to avoid having the
+# 'bracketed_arg' type in @def* index entries trees
 sub _non_bracketed_contents($) {
   my $current = shift;
 
-  if ($current->{'type'} and $current->{'type'} eq 'bracketed') {
+  if ($current->{'type'} and $current->{'type'} eq 'bracketed_arg') {
     my $new = {};
-    $new->{'contents'} = $current->{'contents'} if ($current->{'parent'});
+    $new->{'contents'} = $current->{'contents'} if ($current->{'contents'});
     $new->{'parent'} = $current->{'parent'} if ($current->{'parent'});
     return $new;
   } else {
@@ -422,9 +423,10 @@ sub complete_indices($)
                                {'name' => $name, 'class' => $class},
                                 undef, undef, $entry_language);
             $index_contents_normalized
-              = [_non_bracketed_contents($name),
-                { 'text' => ' on '},
-                _non_bracketed_contents($class)];
+              = [$name, { 'text' => ' on '}, $class];
+              #= [_non_bracketed_contents($name),
+              #  {'text' => ' on '},
+              #  _non_bracketed_contents($class)];
           } elsif ($def_command eq 'defcv'
                    or $def_command eq 'defivar'
                    or $def_command eq 'deftypeivar'
@@ -433,13 +435,14 @@ sub complete_indices($)
                                {'name' => $name, 'class' => $class},
                                undef, undef, $entry_language);
             $index_contents_normalized
-              = [_non_bracketed_contents($name),
-                 { 'text' => ' of '},
-                 _non_bracketed_contents($class)];
+              = [$name, {'text' => ' of '}, $class];
+              #= [_non_bracketed_contents($name),
+              #   {'text' => ' of '},
+              #   _non_bracketed_contents($class)];
           }
 
           # FIXME the 'parent' of the tree elements that correspond to name and
-          # class, be them from gdt or from _non_bracketed_contents, are in the
+          # class, be them from gdt or from the elements, are in the
           # main tree in the definition command arguments, while the new text 
has
           # either no parent (for index_contents_normalized) or the 'root_line'
           # container returned by gdt.



reply via email to

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