texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/parsetexi/end_line.c (end_line_mi


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line), tp/Texinfo/ParserNonXS.pm (_end_line_misc_line): call _set_non_ignored_space_in_index_before_command in any case, enven is there is no extra information on @-commands letting space_in_index_before_command to be more independent of the extra information and where it is stored.
Date: Sun, 07 Jan 2024 10:25:06 -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 a5729959ce * tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line), 
tp/Texinfo/ParserNonXS.pm (_end_line_misc_line): call 
_set_non_ignored_space_in_index_before_command in any case, enven is there is 
no extra information on @-commands letting space_in_index_before_command to be 
more independent of the extra information and where it is stored.
a5729959ce is described below

commit a5729959ce971b9308d472cec695ee84a6a54e1b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 7 16:25:01 2024 +0100

    * tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line),
    tp/Texinfo/ParserNonXS.pm (_end_line_misc_line): call
    _set_non_ignored_space_in_index_before_command in any case, enven is
    there is no extra information on @-commands letting
    space_in_index_before_command to be more independent of the extra
    information and where it is stored.
    
    * tp/Texinfo/ParserNonXS.pm (_end_line_misc_line)
    (_set_non_ignored_space_in_index_before_command): pass an argument to
    _set_non_ignored_space_in_index_before_command and change variable
    names.
---
 ChangeLog                          | 14 ++++++++++++++
 tp/Texinfo/ParserNonXS.pm          | 32 ++++++++++++++------------------
 tp/Texinfo/XS/parsetexi/end_line.c |  6 ++----
 3 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 68b2d0076c..1ea36652f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-01-07  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line),
+       tp/Texinfo/ParserNonXS.pm (_end_line_misc_line): call
+       _set_non_ignored_space_in_index_before_command in any case, enven is
+       there is no extra information on @-commands letting
+       space_in_index_before_command to be more independent of the extra
+       information and where it is stored.
+
+       * tp/Texinfo/ParserNonXS.pm (_end_line_misc_line)
+       (_set_non_ignored_space_in_index_before_command): pass an argument to
+       _set_non_ignored_space_in_index_before_command and change variable
+       names.
+
 2024-01-07  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_handle_line_command),
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 6eaca18998..e2adc6e1fb 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -2885,21 +2885,21 @@ sub _expand_macro_body($$$$) {
 # @seeentry{} back to regular spaces if there is content after the @-command
 sub _set_non_ignored_space_in_index_before_command($)
 {
-  my $contents = shift;
+  my $content = shift;
   my $pending_spaces_element = 0;
-  foreach my $content (@$contents) {
-    if ($content->{'type'}
-        and $content->{'type'} eq 'internal_spaces_before_brace_in_index') {
+  foreach my $element (@{$contents->{'contents'}}) {
+    if ($element->{'type'}
+        and $element->{'type'} eq 'internal_spaces_before_brace_in_index') {
       # set to "spaces_at_end" in case there are only spaces after
-      $content->{'type'} = 'spaces_at_end';
-      $pending_spaces_element = $content;
+      $element->{'type'} = 'spaces_at_end';
+      $pending_spaces_element = $element;
     } elsif ($pending_spaces_element
-             and not (($content->{'cmdname'}
-                       and $in_index_commands{$content->{'cmdname'}}
-                       and defined($brace_commands{$content->{'cmdname'}}))
-                      or ($content->{'type'}
-                   and $content->{'type'} eq 'spaces_after_close_brace'))
-             and (! _check_empty_expansion([$content]))) {
+             and not (($element->{'cmdname'}
+                       and $in_index_commands{$element->{'cmdname'}}
+                       and defined($brace_commands{$element->{'cmdname'}}))
+                      or ($element->{'type'}
+                   and $element->{'type'} eq 'spaces_after_close_brace'))
+             and (! _check_empty_expansion([$element]))) {
       delete $pending_spaces_element->{'type'};
       $pending_spaces_element = 0;
     }
@@ -3747,12 +3747,8 @@ sub _end_line_misc_line($$$)
       # text type with its final type depending on whether there is
       # text after the brace command.
       if (_is_index_element($self, $current)) {
-        if (defined($current->{'extra'}->{'sortas'})
-            or defined($current->{'extra'}->{'seealso'})
-            or defined($current->{'extra'}->{'seeentry'})) {
-          _set_non_ignored_space_in_index_before_command(
-                         $current->{'args'}->[0]->{'contents'});
-        }
+        _set_non_ignored_space_in_index_before_command(
+                                          $current->{'args'}->[0]);
       }
     }
   }
diff --git a/tp/Texinfo/XS/parsetexi/end_line.c 
b/tp/Texinfo/XS/parsetexi/end_line.c
index 3662a4fd5d..ef4371aa93 100644
--- a/tp/Texinfo/XS/parsetexi/end_line.c
+++ b/tp/Texinfo/XS/parsetexi/end_line.c
@@ -1574,10 +1574,8 @@ end_line_misc_line (ELEMENT *current)
           if ((command_flags(current) & CF_index_entry_command
                 || current->cmd == CM_subentry))
             {
-              if (lookup_extra_string (current, "sortas")
-                   || lookup_extra_element (current, "seealso")
-                   || lookup_extra_element (current, "seeentry"))
-                
set_non_ignored_space_in_index_before_command(current->args.list[0]);
+              set_non_ignored_space_in_index_before_command(
+                                                     current->args.list[0]);
             }
         }
     }



reply via email to

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