texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Add alias_of info key for an alias used for an @-


From: Patrice Dumas
Subject: branch master updated: Add alias_of info key for an alias used for an @-command element
Date: Sat, 04 Mar 2023 06:00:44 -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 fbe9aeb6c6 Add alias_of info key for an alias used for an @-command 
element
fbe9aeb6c6 is described below

commit fbe9aeb6c60ef46bb4d59c28f95bad90559f5680
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Mar 4 11:59:27 2023 +0100

    Add alias_of info key for an alias used for an @-command element
    
    * tp/Texinfo/ParserNonXS.pm (_handle_macro, _handle_other_command)
    (_handle_line_command, _handle_block_command)
    (_process_remaining_on_line),
    tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command)
    (handle_line_command, handle_block_command, handle_brace_command),
    tp/Texinfo/XS/parsetexi/macro.c (handle_macro),
    tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
    handle_macro returns the element containing the macro expansion
    argument, or 0 if there was an error instead of returning an error
    status.
    Return command element and change command element variable name
    in handle_*_command functions.
    Add alias information in command element in alias_of info key.
---
 ChangeLog                                          |  18 ++
 tp/TODO                                            |   4 -
 tp/Texinfo/ParserNonXS.pm                          | 202 +++++++++++----------
 tp/Texinfo/XS/parsetexi/handle_commands.c          | 182 ++++++++++---------
 tp/Texinfo/XS/parsetexi/handle_commands.h          |  11 +-
 tp/Texinfo/XS/parsetexi/macro.c                    |  13 +-
 tp/Texinfo/XS/parsetexi/macro.h                    |   4 +-
 tp/Texinfo/XS/parsetexi/parser.c                   |  36 ++--
 tp/t/results/alias/alias_macro_target_removed.pl   |   3 +
 tp/t/results/alias/alias_of_added_index.pl         |   1 +
 .../alias_of_added_index_before_added_index.pl     |   1 +
 tp/t/results/alias/alias_of_definfoenclose.pl      |   3 +
 ...lias_of_definfoenclose_before_definfoenclose.pl |   3 +
 tp/t/results/alias/alias_of_macro.pl               |   3 +
 tp/t/results/alias/alias_of_macro_before_macro.pl  |   3 +
 tp/t/results/alias/alias_table_command.pl          |   3 +
 tp/t/results/alias/block_command_alias.pl          |   3 +
 tp/t/results/alias/recursive_alias.pl              |   3 +
 tp/t/results/alias/simple.pl                       |   4 +
 tp/t/results/alias/texinfo_command_alias.pl        |   6 +
 .../alias/texinfo_command_alias_indirect.pl        |   3 +
 .../alias/texinfo_command_alias_indirect_before.pl |   3 +
 .../macro/macro_alias_definfoenclose_defindex.pl   |   9 +
 23 files changed, 316 insertions(+), 205 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3f2003b496..8e4cbf200c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,24 @@
 
        This is mainly intended for use with @defblock/@defline.
 
+2023-03-03  Patrice Dumas  <pertusus@free.fr>
+
+       Add alias_of info key for an alias used for an @-command element
+
+       * tp/Texinfo/ParserNonXS.pm (_handle_macro, _handle_other_command)
+       (_handle_line_command, _handle_block_command)
+       (_process_remaining_on_line),
+       tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command)
+       (handle_line_command, handle_block_command, handle_brace_command),
+       tp/Texinfo/XS/parsetexi/macro.c (handle_macro),
+       tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
+       handle_macro returns the element containing the macro expansion
+       argument, or 0 if there was an error instead of returning an error
+       status.
+       Return command element and change command element variable name
+       in handle_*_command functions.
+       Add alias information in command element in alias_of info key.
+
 2023-03-03  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_handle_line_command),
diff --git a/tp/TODO b/tp/TODO
index c1889b98f0..b0eb8afb3a 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -15,10 +15,6 @@ Bugs
 
 source marks in parse_node_manual
 
-Add source marks for alias. Not easy, as command elements are added in many
-places in the code.
-
-
 
 HTML API
 ========
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 22065cf24a..09024fa1c4 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -4702,8 +4702,6 @@ sub _handle_macro($$$$$)
   my $source_info = shift;
   my $command = shift;
 
-  my $error = 0;
-
   my $expanded_macro = $self->{'macros'}->{$command}->{'element'};
   my $args_number = scalar(@{$expanded_macro->{'args'}}) -1;
   my $arguments_container = {'type' => $expanded_macro->{'cmdname'}.'_call',
@@ -4763,9 +4761,8 @@ sub _handle_macro($$$$$)
     $self->_line_warn(sprintf(__(
   "macro call nested too deeply (set MAX_MACRO_CALL_NESTING to override; 
current value %d)"),
                           $self->{'MAX_MACRO_CALL_NESTING'}), $source_info);
-    $error = 1;
     # goto funexit in XS parser
-    return ($error, $line, $source_info);
+    return (undef, $line, $source_info);
   }
 
   if ($expanded_macro->{'cmdname'} eq 'macro') {
@@ -4774,9 +4771,8 @@ sub _handle_macro($$$$$)
         $self->_line_error(sprintf(__(
        "recursive call of macro %s is not allowed; use \@rmacro if needed"),
                                    $command), $source_info);
-        $error = 1;
         # goto funexit in XS parser
-        return ($error, $line, $source_info);
+        return (undef, $line, $source_info);
       }
     }
   }
@@ -4810,7 +4806,7 @@ sub _handle_macro($$$$$)
   # was no macro expansion error
   $line = '';
  #funexit:
-  return ($error, $line, $source_info);
+  return ($arguments_container, $line, $source_info);
 }
 
 # to have similar code with the XS parser, the only returned information
@@ -4987,11 +4983,11 @@ sub _handle_other_command($$$$$)
 
   # symbol skipspace other
   my $arg_spec = $nobrace_commands{$command};
-  my $misc;
+  my $command_e;
 
   if ($arg_spec ne 'skipspace') {
-    $misc = {'cmdname' => $command, 'parent' => $current};
-    push @{$current->{'contents'}}, $misc;
+    $command_e = {'cmdname' => $command, 'parent' => $current};
+    push @{$current->{'contents'}}, $command_e;
 
     if ($in_heading_spec_commands{$command}) {
       # TODO use a more generic system for check of @-command nesting
@@ -5016,7 +5012,7 @@ sub _handle_other_command($$$$$)
         $retval = $GET_A_NEW_LINE;
       }
     } else { # other
-      _register_global_command($self, $misc, $source_info);
+      _register_global_command($self, $command_e, $source_info);
       $current = _begin_preformatted($self, $current)
         if ($close_preformatted_commands{$command});
     }
@@ -5029,10 +5025,10 @@ sub _handle_other_command($$$$$)
         if ($command eq 'item') {
           print STDERR "ITEM_CONTAINER\n" if ($self->{'DEBUG'});
           $parent->{'items_count'}++;
-          $misc = { 'cmdname' => $command, 'parent' => $parent,
-                    'extra' =>
-                      {'item_number' => $parent->{'items_count'}} };
-          push @{$parent->{'contents'}}, $misc;
+          $command_e = { 'cmdname' => $command, 'parent' => $parent,
+                         'extra' =>
+                          {'item_number' => $parent->{'items_count'}} };
+          push @{$parent->{'contents'}}, $command_e;
           $current = $parent->{'contents'}->[-1];
         } else {
           $self->_line_error(sprintf(__(
@@ -5064,12 +5060,12 @@ sub _handle_other_command($$$$$)
                    $parent->{'extra'}->{'max_columns'}), $source_info);
           } else {
             $row->{'cells_count'}++;
-            $misc = { 'cmdname' => $command,
-                      'parent' => $row,
-                      'contents' => [],
-                      'extra' =>
-                  {'cell_number' => $row->{'cells_count'}} };
-            push @{$row->{'contents'}}, $misc;
+            $command_e = { 'cmdname' => $command,
+                           'parent' => $row,
+                           'contents' => [],
+                           'extra' =>
+                              {'cell_number' => $row->{'cells_count'}} };
+            push @{$row->{'contents'}}, $command_e;
             $current = $row->{'contents'}->[-1];
             print STDERR "TAB\n" if ($self->{'DEBUG'});
           }
@@ -5081,11 +5077,11 @@ sub _handle_other_command($$$$$)
                       'extra' => {'row_number' => $parent->{'rows_count'} },
                       'parent' => $parent };
           push @{$parent->{'contents'}}, $row;
-          $misc =  { 'cmdname' => $command,
-                     'parent' => $row,
-                     'contents' => [],
-                     'extra' => {'cell_number' => 1}};
-          push @{$row->{'contents'}}, $misc;
+          $command_e = { 'cmdname' => $command,
+                         'parent' => $row,
+                         'contents' => [],
+                         'extra' => {'cell_number' => 1}};
+          push @{$row->{'contents'}}, $command_e;
           $current = $row->{'contents'}->[-1];
         }
         $current = _begin_preformatted($self, $current);
@@ -5098,11 +5094,11 @@ sub _handle_other_command($$$$$)
            "\@%s outside of table or list"), $command), $source_info);
         $current = _begin_preformatted($self, $current);
       }
-      $misc->{'source_info'} = $source_info if (defined($misc));
+      $command_e->{'source_info'} = $source_info if (defined($command_e));
     } else {
-      $misc = { 'cmdname' => $command, 'parent' => $current,
-          'source_info' => $source_info };
-      push @{$current->{'contents'}}, $misc;
+      $command_e = { 'cmdname' => $command, 'parent' => $current,
+                     'source_info' => $source_info };
+      push @{$current->{'contents'}}, $command_e;
       if (($command eq 'indent' or $command eq 'noindent')
            and _in_paragraph($self, $current)) {
         $self->_line_warn(sprintf(__("\@%s is useless inside of a paragraph"),
@@ -5112,7 +5108,7 @@ sub _handle_other_command($$$$$)
     }
     $line = _start_empty_line_after_command($line, $current, undef);
   }
-  return ($current, $line, $retval);
+  return ($current, $line, $retval, $command_e);
 }
 
 sub _handle_line_command($$$$$$)
@@ -5158,7 +5154,8 @@ sub _handle_line_command($$$$$$)
 
   # text line lineraw special specific
   my $arg_spec = $self->{'line_commands'}->{$data_cmdname};
-  my $misc;
+
+  my $command_e;
 
   # all the cases using the raw line
   if ($arg_spec eq 'lineraw' or $arg_spec eq 'special') {
@@ -5192,8 +5189,8 @@ sub _handle_line_command($$$$$$)
                  = _new_line($self, $current);
       $line .= $new_line if (defined($new_line));
     }
-    $misc = {'cmdname' => $command,
-             'parent' => $current};
+    $command_e = {'cmdname' => $command,
+                  'parent' => $current};
     my $args = [];
     my $has_comment;
     if ($arg_spec eq 'lineraw') {
@@ -5201,7 +5198,7 @@ sub _handle_line_command($$$$$$)
     } elsif ($arg_spec eq 'special') {
       ($args, $has_comment)
        = _parse_special_misc_command($self, $line, $command, $source_info);
-      $misc->{'info'} = {'arg_line' => $line};
+      $command_e->{'info'} = {'arg_line' => $line};
       # FIXME add a check on @clickstyle argument at that point?
     }
 
@@ -5221,34 +5218,34 @@ sub _handle_line_command($$$$$$)
       }
       # note that those commands are line 'specific' type.
       $command = $set_flag_command_equivalent{$args->[0]};
-      $misc = {'cmdname' => $command,
-               'parent' => $current,
-               'source_info' => $source_info,
-               'extra' => {'misc_args' => [$arg],},
-               'info' => {'spaces_before_argument' => {'text' => ' '}}};
+      $command_e = {'cmdname' => $command,
+                    'parent' => $current,
+                    'source_info' => $source_info,
+                    'extra' => {'misc_args' => [$arg],},
+                    'info' => {'spaces_before_argument' => {'text' => ' '}}};
       my $misc_line_args = {'type' => 'line_arg',
-             'parent' => $misc,
-             'info' => {'spaces_after_argument'
-                          => {'text' => "\n",}}};
-      $misc->{'args'} = [$misc_line_args];
+                            'parent' => $command_e,
+                            'info' => {'spaces_after_argument'
+                                   => {'text' => "\n",}}};
+      $command_e->{'args'} = [$misc_line_args];
       $misc_line_args->{'contents'} = [
         { 'text' => $arg,
           'parent' => $misc_line_args, },
       ];
-      push @{$current->{'contents'}}, $misc;
+      push @{$current->{'contents'}}, $command_e;
     } else {
       if (!$ignored) {
-        push @{$current->{'contents'}}, $misc;
+        push @{$current->{'contents'}}, $command_e;
         if (scalar(@$args)) {
-          $misc->{'args'} = [];
+          $command_e->{'args'} = [];
           foreach my $arg (@$args) {
-            push @{$misc->{'args'}},
+            push @{$command_e->{'args'}},
               { 'type' => 'misc_arg', 'text' => $arg,
                 'parent' => $current->{'contents'}->[-1] };
           }
         }
       } else {
-        $misc = undef;
+        $command_e = undef;
       }
     }
     if ($command eq 'raisesections') {
@@ -5256,8 +5253,8 @@ sub _handle_line_command($$$$$$)
     } elsif ($command eq 'lowersections') {
       $self->{'sections_level'}--;
     }
-    _register_global_command($self, $misc, $source_info)
-      if $misc;
+    _register_global_command($self, $command_e, $source_info)
+      if $command_e;
     # the end of line is ignored for special commands
     if ($arg_spec ne 'special' or !$has_comment) {
       $current = _end_line($self, $current, $source_info);
@@ -5287,11 +5284,11 @@ sub _handle_line_command($$$$$$)
            "\@%s outside of table or list"), $command), $source_info);
         $current = _begin_preformatted($self, $current);
       }
-      $misc = { 'cmdname' => $command, 'parent' => $current };
-      push @{$current->{'contents'}}, $misc;
-      $misc->{'source_info'} = $source_info;
+      $command_e = { 'cmdname' => $command, 'parent' => $current };
+      push @{$current->{'contents'}}, $command_e;
+      $command_e->{'source_info'} = $source_info;
     } else {
-      $misc = { 'cmdname' => $command, 'source_info' => $source_info };
+      $command_e = { 'cmdname' => $command, 'source_info' => $source_info };
       if ($command eq 'subentry') {
         my $parent = $current->{'parent'};
         if (!_is_index_element($self, $parent)) {
@@ -5300,12 +5297,12 @@ sub _handle_line_command($$$$$$)
                     $command), $source_info);
         }
         $parent->{'extra'} = {} if (!defined($parent->{'extra'}));
-        $parent->{'extra'}->{'subentry'} = $misc;
+        $parent->{'extra'}->{'subentry'} = $command_e;
         my $subentry_level = 1;
         if ($parent->{'cmdname'} eq 'subentry') {
           $subentry_level = $parent->{'extra'}->{'level'} + 1;
         }
-        $misc->{'extra'} = {'level' => $subentry_level};
+        $command_e->{'extra'} = {'level' => $subentry_level};
         if ($subentry_level > 2) {
           $self->_line_error(__(
       "no more than two levels of index subentry are allowed"),
@@ -5317,11 +5314,12 @@ sub _handle_line_command($$$$$$)
         $current = _end_line($self, $current, $source_info);
       } elsif ($sectioning_heading_commands{$data_cmdname}) {
         if ($self->{'sections_level'}) {
-          $misc->{'extra'} = {'sections_level' => $self->{'sections_level'}};
+          $command_e->{'extra'}
+            = {'sections_level' => $self->{'sections_level'}};
         }
       }
-      push @{$current->{'contents'}}, $misc;
-      $misc->{'parent'} = $current;
+      push @{$current->{'contents'}}, $command_e;
+      $command_e->{'parent'} = $current;
       # def*x
       if ($def_commands{$data_cmdname}) {
         my $base_command = $command;
@@ -5340,10 +5338,10 @@ sub _handle_line_command($$$$$$)
         }
         if ($current->{'cmdname'}
             and $current->{'cmdname'} eq $base_command) {
-          # popped element should be the same as $misc
+          # popped element should be the same as $command_e
           _pop_element_from_contents($self, $current);
           _gather_def_item($self, $current, $command);
-          push @{$current->{'contents'}}, $misc;
+          push @{$current->{'contents'}}, $command_e;
         }
         if (!$current->{'cmdname'}
              or ($current->{'cmdname'} ne $base_command
@@ -5417,14 +5415,14 @@ sub _handle_line_command($$$$$$)
     $current = $current->{'args'}->[-1];
     $self->_push_context('ct_line', $command)
       unless ($def_commands{$data_cmdname});
-    $line = _start_empty_line_after_command($line, $current, $misc);
+    $line = _start_empty_line_after_command($line, $current, $command_e);
   }
-  _register_global_command($self, $misc, $source_info)
-    if $misc;
+  _register_global_command($self, $command_e, $source_info)
+    if $command_e;
   if ($command eq 'dircategory') {
-    push @{$self->{'info'}->{'dircategory_direntry'}}, $misc;
+    push @{$self->{'info'}->{'dircategory_direntry'}}, $command_e;
   }
-  return ($current, $line, $retval);
+  return ($current, $line, $retval, $command_e);
 }
 
 sub _handle_block_command($$$$$)
@@ -5437,15 +5435,16 @@ sub _handle_block_command($$$$$)
 
   my $retval = $STILL_MORE_TO_PROCESS;
 
+  my $block;
+
   if ($command eq 'macro' or $command eq 'rmacro') {
-    my $macro = _parse_macro_command_line($self, $command, $line,
-                                          $current, $source_info);
-    push @{$current->{'contents'}}, $macro;
+    $block = _parse_macro_command_line($self, $command, $line,
+                                       $current, $source_info);
+    push @{$current->{'contents'}}, $block;
     $current = $current->{'contents'}->[-1];
     return ($current, $line, $GET_A_NEW_LINE);
     # goto funexit;  # used in XS code
   } else {
-    my $block;
     # a menu command closes a menu_comment, but not the other
     # block commands. This won't catch menu commands buried in
     # other formats (that are incorrect anyway).
@@ -5561,7 +5560,7 @@ sub _handle_block_command($$$$$)
     _register_global_command($self, $block, $source_info);
     $line = _start_empty_line_after_command($line, $current, $block);
   }
-  return ($current, $line, $retval);
+  return ($current, $line, $retval, $block);
 }
 
 sub _handle_brace_command($$$$)
@@ -5573,34 +5572,34 @@ sub _handle_brace_command($$$$)
 
   print STDERR "OPEN BRACE \@$command\n"
      if ($self->{'DEBUG'});
-  push @{$current->{'contents'}}, { 'cmdname' => $command,
-                                    'parent' => $current,
-                                    };
-  $current->{'contents'}->[-1]->{'source_info'} = $source_info;
+
+  my $command_e = { 'cmdname' => $command, 'parent' => $current,};
+  $command_e->{'source_info'} = $source_info;
+  push @{$current->{'contents'}}, $command_e;
   if ($in_index_commands{$command}
       and !_is_index_element($self, $current->{'parent'})) {
     $self->_line_warn(
       sprintf(__("\@%s should only appear in an index entry"),
               $command), $source_info);
   }
-  $current = $current->{'contents'}->[-1];
+  $current = $command_e;
   if ($command eq 'click') {
-    $current->{'extra'} = {} if (!$current->{'extra'});
-    $current->{'extra'}->{'clickstyle'} = $self->{'clickstyle'};
+    $command_e->{'extra'} = {} if (!$command_e->{'extra'});
+    $command_e->{'extra'}->{'clickstyle'} = $self->{'clickstyle'};
   } elsif ($command eq 'kbd'
            and _kbd_formatted_as_code($self, $current)) {
-    $current->{'extra'} = {} if (!$current->{'extra'});
-    $current->{'extra'}->{'code'} = 1;
+    $command_e->{'extra'} = {} if (!$command_e->{'extra'});
+    $command_e->{'extra'}->{'code'} = 1;
   }
   if ($self->{'definfoenclose'}->{$command}) {
-    $current->{'type'} = 'definfoenclose_command';
-    $current->{'extra'} = {} if (!$current->{'extra'});
-    $current->{'extra'}->{'begin'}
+    $command_e->{'type'} = 'definfoenclose_command';
+    $command_e->{'extra'} = {} if (!$command_e->{'extra'});
+    $command_e->{'extra'}->{'begin'}
       = $self->{'definfoenclose'}->{$command}->[0];
-    $current->{'extra'}->{'end'}
+    $command_e->{'extra'}->{'end'}
       = $self->{'definfoenclose'}->{$command}->[1];
   }
-  return $current;
+  return ($current, $command_e);
 }
 
 sub _process_remaining_on_line($$$$)
@@ -5838,6 +5837,7 @@ sub _process_remaining_on_line($$$$)
        if ($self->{'DEBUG'} and $self->{'DEBUG'} > 3);
 
   my $command;
+  my $from_alias;
   if ($single_letter_command) {
     $command = $single_letter_command;
   } elsif ($at_command) {
@@ -5845,7 +5845,8 @@ sub _process_remaining_on_line($$$$)
     $command = $at_command;
 
     if (exists($self->{'aliases'}->{$command})) {
-      $command = $self->{'aliases'}->{$command};
+      $from_alias = $command;
+      $command = $self->{'aliases'}->{$from_alias};
     }
 
     # handle user defined macros before anything else since
@@ -5853,15 +5854,21 @@ sub _process_remaining_on_line($$$$)
     if ($self->{'macros'}->{$command}) {
       substr($line, 0, $at_command_length) = '';
 
-      my $expansion_error;
-      ($expansion_error, $line, $source_info)
+      my $argument_container;
+      ($argument_container, $line, $source_info)
         = _handle_macro($self, $current, $line, $source_info, $command);
-      if (!$expansion_error) {
+      if ($argument_container) {
         # directly get the following input (macro expansion text) instead
         # of going through the next call of process_remaining_on_line and
         # the processing of empty text.  No difference in output, more
         # efficient.
         ($line, $source_info) = _next_text($self, $current);
+
+        if ($from_alias) {
+          $argument_container->{'info'} = {}
+             if (!$argument_container->{'info'});
+          $argument_container->{'info'}->{'alias_of'} = $from_alias;
+        }
       }
       return ($current, $line, $source_info, $retval);
       # goto funexit;  # used in XS code
@@ -6198,23 +6205,30 @@ sub _process_remaining_on_line($$$$)
       $current = $paragraph if ($paragraph);
     }
 
+    my $command_element;
+
     if (defined($nobrace_commands{$data_cmdname})) {
-      ($current, $line, $retval)
+      ($current, $line, $retval, $command_element)
         = _handle_other_command($self, $current, $command, $line, 
$source_info);
       # in the XS parser return here if GET_A_NEW_LINE or FINISHED_TOTALLY
     # line commands
     } elsif (defined($self->{'line_commands'}->{$data_cmdname})) {
-      ($current, $line, $retval)
+      ($current, $line, $retval, $command_element)
        = _handle_line_command($self, $current, $command, $data_cmdname, $line,
                               $source_info);
       # in the XS parser return here if GET_A_NEW_LINE or FINISHED_TOTALLY
     # @-command with matching @end opening
     } elsif (exists($block_commands{$data_cmdname})) {
-      ($current, $line, $retval)
+      ($current, $line, $retval, $command_element)
        = _handle_block_command($self, $current, $command, $line, $source_info);
       # in the XS parser return here if GET_A_NEW_LINE
     } elsif (defined($self->{'brace_commands'}->{$data_cmdname})) {
-      $current = _handle_brace_command($self, $current, $command, 
$source_info);
+      ($current, $command_element)
+        = _handle_brace_command($self, $current, $command, $source_info);
+    }
+    if ($from_alias and $command_element) {
+      $command_element->{'info'} = {} if (!$command_element->{'info'});
+      $command_element->{'info'}->{'alias_of'} = $from_alias;
     }
   } elsif ($separator_match) {
     my $separator = $separator_match;
diff --git a/tp/Texinfo/XS/parsetexi/handle_commands.c 
b/tp/Texinfo/XS/parsetexi/handle_commands.c
index f82a2cc0e0..d8805d5f0d 100644
--- a/tp/Texinfo/XS/parsetexi/handle_commands.c
+++ b/tp/Texinfo/XS/parsetexi/handle_commands.c
@@ -97,9 +97,10 @@ in_paragraph (ELEMENT *current)
 /* symbol skipspace other */
 ELEMENT *
 handle_other_command (ELEMENT *current, char **line_inout,
-                     enum command_id cmd, int *status)
+                     enum command_id cmd, int *status,
+                     ELEMENT **command_element)
 {
-  ELEMENT *misc = 0;
+  ELEMENT *command_e = 0;
   char *line = *line_inout;
   int arg_spec;
 
@@ -108,9 +109,9 @@ handle_other_command (ELEMENT *current, char **line_inout,
   arg_spec = command_data(cmd).data;
   if (arg_spec != NOBRACE_skipspace)
     {
-      misc = new_element (ET_NONE);
-      misc->cmd = cmd;
-      add_to_element_contents (current, misc);
+      command_e = new_element (ET_NONE);
+      command_e->cmd = cmd;
+      add_to_element_contents (current, command_e);
       if (command_data(cmd).flags & CF_in_heading_spec
           && !(command_data(current_context_command()).flags & 
CF_heading_spec))
         {
@@ -132,7 +133,7 @@ handle_other_command (ELEMENT *current, char **line_inout,
         }
       else  /* NOBRACE_other */
         {
-          register_global_command (misc);
+          register_global_command (command_e);
           if (close_preformatted_command(cmd))
             current = begin_preformatted (current);
         }
@@ -152,14 +153,14 @@ handle_other_command (ELEMENT *current, char **line_inout,
                 {
                   debug ("ITEM CONTAINER");
                   counter_inc (&count_items);
-                  misc = new_element (ET_NONE);
-                  misc->cmd = CM_item;
+                  command_e = new_element (ET_NONE);
+                  command_e->cmd = CM_item;
 
-                  add_extra_integer (misc, "item_number",
+                  add_extra_integer (command_e, "item_number",
                                      counter_value (&count_items, parent));
 
-                  add_to_element_contents (parent, misc);
-                  current = misc;
+                  add_to_element_contents (parent, command_e);
+                  current = command_e;
                 }
               else
                 {
@@ -218,10 +219,10 @@ handle_other_command (ELEMENT *current, char **line_inout,
                   else
                     {
                       counter_inc (&count_cells);
-                      misc = new_element (ET_NONE);
-                      misc->cmd = cmd;
-                      add_to_element_contents (row, misc);
-                      current = misc;
+                      command_e = new_element (ET_NONE);
+                      command_e->cmd = cmd;
+                      add_to_element_contents (row, command_e);
+                      current = command_e;
                       debug ("TAB");
 
                       add_extra_integer (current, "cell_number",
@@ -241,10 +242,10 @@ handle_other_command (ELEMENT *current, char **line_inout,
                   add_extra_integer (row, "row_number",
                                      parent->contents.number - 1);
 
-                  misc = new_element (ET_NONE);
-                  misc->cmd = cmd;
-                  add_to_element_contents (row, misc);
-                  current = misc;
+                  command_e = new_element (ET_NONE);
+                  command_e->cmd = cmd;
+                  add_to_element_contents (row, command_e);
+                  current = command_e;
 
                   if (counter_value (&count_cells, parent) != -1)
                     counter_pop (&count_cells);
@@ -265,15 +266,15 @@ handle_other_command (ELEMENT *current, char **line_inout,
                           command_name(cmd));
               current = begin_preformatted (current);
             }
-          if (misc)
-            misc->source_info = current_source_info;
+          if (command_e)
+            command_e->source_info = current_source_info;
         }
       else
         {
-          misc = new_element (ET_NONE);
-          misc->cmd = cmd;
-          misc->source_info = current_source_info;
-          add_to_element_contents (current, misc);
+          command_e = new_element (ET_NONE);
+          command_e->cmd = cmd;
+          command_e->source_info = current_source_info;
+          add_to_element_contents (current, command_e);
           if ((cmd == CM_indent || cmd == CM_noindent)
                && in_paragraph (current))
             {
@@ -285,6 +286,7 @@ handle_other_command (ELEMENT *current, char **line_inout,
     }
 
   *line_inout = line;
+  *command_element = command_e;
   return current;
 }
 
@@ -294,9 +296,10 @@ handle_other_command (ELEMENT *current, char **line_inout,
    is different for the only multicategory command, @item */
 ELEMENT *
 handle_line_command (ELEMENT *current, char **line_inout,
-                     enum command_id cmd, enum command_id data_cmd, int 
*status)
+                     enum command_id cmd, enum command_id data_cmd, int 
*status,
+                     ELEMENT **command_element)
 {
-  ELEMENT *misc = 0;
+  ELEMENT *command_e = 0;
   char *line = *line_inout;
   int arg_spec;
 
@@ -377,8 +380,8 @@ handle_line_command (ELEMENT *current, char **line_inout,
             }
         }
 
-      misc = new_element (ET_NONE);
-      misc->cmd = cmd;
+      command_e = new_element (ET_NONE);
+      command_e->cmd = cmd;
 
       if (arg_spec == LINE_lineraw)
         {
@@ -391,7 +394,7 @@ handle_line_command (ELEMENT *current, char **line_inout,
       else /* arg_spec == LINE_special */
         {
           args = parse_special_misc_command (line, cmd, &has_comment);
-          add_info_string_dup (misc, "arg_line", line);
+          add_info_string_dup (command_e, "arg_line", line);
         }
 
       /* Handle @set txicodequoteundirected as an
@@ -431,16 +434,16 @@ handle_line_command (ELEMENT *current, char **line_inout,
           text_append (&e->text, arg);
           add_to_element_contents (args, e);
 
-          destroy_element_and_children (misc);
-          misc = new_element (ET_NONE);
-          misc->cmd = equivalent_cmd;
-          misc->source_info = current_source_info;
+          destroy_element_and_children (command_e);
+          command_e = new_element (ET_NONE);
+          command_e->cmd = equivalent_cmd;
+          command_e->source_info = current_source_info;
 
           line_args = new_element (ET_line_arg);
-          add_to_element_args (misc, line_args);
-          add_extra_misc_args (misc, "misc_args", args);
+          add_to_element_args (command_e, line_args);
+          add_extra_misc_args (command_e, "misc_args", args);
           text_append (&spaces_before->text, " ");
-          add_info_element_oot (misc, "spaces_before_argument", spaces_before);
+          add_info_element_oot (command_e, "spaces_before_argument", 
spaces_before);
 
           text_append (&spaces_after->text, "\n");
           add_info_element_oot (line_args, "spaces_after_argument",
@@ -450,14 +453,14 @@ handle_line_command (ELEMENT *current, char **line_inout,
           text_append (&e->text, arg);
           add_to_element_contents (line_args, e);
 
-          add_to_element_contents (current, misc);
+          add_to_element_contents (current, command_e);
         }
       else
         {
           int i;
           if (!ignored)
             {
-              add_to_element_contents (current, misc);
+              add_to_element_contents (current, command_e);
 
               for (i = 0; i < args->contents.number; i++)
                 {
@@ -465,13 +468,13 @@ handle_line_command (ELEMENT *current, char **line_inout,
                   text_append_n (&misc_arg->text, 
                                  args->contents.list[i]->text.text,
                                  args->contents.list[i]->text.end);
-                  add_to_element_args (misc, misc_arg);
+                  add_to_element_args (command_e, misc_arg);
                 }
             }
           else
             {
-              destroy_element_and_children (misc);
-              misc = 0;
+              destroy_element_and_children (command_e);
+              command_e = 0;
             }
           destroy_element_and_children (args);
         }
@@ -485,8 +488,8 @@ handle_line_command (ELEMENT *current, char **line_inout,
           global_info.sections_level--;
         }
 
-      if (misc) 
-        register_global_command (misc);
+      if (command_e)
+        register_global_command (command_e);
 
       if (arg_spec != LINE_special || !has_comment)
         current = end_line (current);
@@ -524,17 +527,17 @@ handle_line_command (ELEMENT *current, char **line_inout,
                           command_name(cmd));
               current = begin_preformatted (current);
             }
-          misc = new_element (ET_NONE);
-          misc->cmd = cmd;
-          misc->source_info = current_source_info;
-          add_to_element_contents (current, misc);
+          command_e = new_element (ET_NONE);
+          command_e->cmd = cmd;
+          command_e->source_info = current_source_info;
+          add_to_element_contents (current, command_e);
         }
       else
         {
           /* Add to contents */
-          misc = new_element (ET_NONE);
-          misc->cmd = cmd;
-          misc->source_info = current_source_info;
+          command_e = new_element (ET_NONE);
+          command_e->cmd = cmd;
+          command_e->source_info = current_source_info;
 
           if (cmd == CM_subentry)
             {
@@ -547,7 +550,7 @@ handle_line_command (ELEMENT *current, char **line_inout,
                   line_warn ("@subentry should only occur in an index entry");
                 }
 
-              add_extra_element (parent, "subentry", misc);
+              add_extra_element (parent, "subentry", command_e);
 
               if (parent->cmd == CM_subentry)
                 {
@@ -555,7 +558,7 @@ handle_line_command (ELEMENT *current, char **line_inout,
                   if (k && k->value)
                     level = (long) k->value + 1;
                 }
-              add_extra_integer (misc, "level", level);
+              add_extra_integer (command_e, "level", level);
               if (level > 2)
                 {
                   line_error
@@ -568,13 +571,13 @@ handle_line_command (ELEMENT *current, char **line_inout,
               current = end_line (current);
             }
 
-          add_to_element_contents (current, misc);
+          add_to_element_contents (current, command_e);
 
           if (command_data(data_cmd).flags & CF_sectioning_heading)
             {
               if (global_info.sections_level)
                 {
-                  add_extra_integer (misc, "sections_level",
+                  add_extra_integer (command_e, "sections_level",
                                      global_info.sections_level);
                 }
             }
@@ -589,9 +592,9 @@ handle_line_command (ELEMENT *current, char **line_inout,
               if (cmd == CM_defline)
                 {
                   base_command = cmd;
-                  add_extra_string_dup (misc, "original_def_cmdname",
+                  add_extra_string_dup (command_e, "original_def_cmdname",
                                         command_name(cmd));
-                  add_extra_string_dup (misc, "def_command",
+                  add_extra_string_dup (command_e, "def_command",
                                         command_name(cmd));
                 }
               else
@@ -603,7 +606,8 @@ handle_line_command (ELEMENT *current, char **line_inout,
                   int base_len;
 
                   base_name = command_name(cmd);
-                  add_extra_string_dup (misc, "original_def_cmdname", 
base_name);
+                  add_extra_string_dup (command_e, "original_def_cmdname",
+                                        base_name);
                   base_name = strdup (base_name);
                   base_len = strlen (base_name);
                   if (base_name[base_len - 1] != 'x')
@@ -612,22 +616,22 @@ handle_line_command (ELEMENT *current, char **line_inout,
                   base_command = lookup_command (base_name);
                   if (base_command == CM_NONE)
                     fatal ("no def base command");
-                  add_extra_string (misc, "def_command", base_name);
+                  add_extra_string (command_e, "def_command", base_name);
                 }
 
               after_paragraph = check_no_text (current);
               push_context (ct_def, cmd);
-              misc->type = ET_def_line;
+              command_e->type = ET_def_line;
 
               /* Check txidefnamenospace flag */
               val = fetch_value ("txidefnamenospace");
               if (val)
-                add_extra_integer (misc, "omit_def_name_space", 1);
+                add_extra_integer (command_e, "omit_def_name_space", 1);
 
               if (current->cmd == base_command)
                 {
                   ELEMENT *e = pop_element_from_contents (current);
-                  /* e should be the same as misc */
+                  /* e should be the same as command_e */
                   /* Gather an "inter_def_item" element. */
                   gather_def_item (current, cmd);
                   add_to_element_contents (current, e);
@@ -639,12 +643,12 @@ handle_line_command (ELEMENT *current, char **line_inout,
                   line_error ("must be after `@%s' to use `@%s'",
                                command_name(base_command),
                                command_name(cmd));
-                  add_extra_integer (misc, "not_after_command", 1);
+                  add_extra_integer (command_e, "not_after_command", 1);
                 }
             }
         }
 
-      /* change 'current' to its last child.  This is ELEMENT *misc above.  */
+      /* change 'current' to its last child.  This is command_e.  */
       current = last_contents_child (current);
       arg = new_element (ET_line_arg);
       add_to_element_args (current, arg);
@@ -708,16 +712,17 @@ handle_line_command (ELEMENT *current, char **line_inout,
          case while we read the argument on this line. */
       if (!(command_data(data_cmd).flags & CF_def))
         push_context (ct_line, cmd);
-      start_empty_line_after_command (current, &line, misc);
+      start_empty_line_after_command (current, &line, command_e);
     }
 
-  if (misc)
-    register_global_command (misc);
+  if (command_e)
+    register_global_command (command_e);
   if (cmd == CM_dircategory)
-    add_to_contents_as_array (&global_info.dircategory_direntry, misc);
+    add_to_contents_as_array (&global_info.dircategory_direntry, command_e);
 
 funexit:
   *line_inout = line;
+  *command_element = command_e;
   return current;
 }
 
@@ -773,22 +778,23 @@ format_expanded_p (char *format)
 }
 
 /* A command name has been read that starts a multiline block, which should
-   end in @end <command name>.  The block will be processed until 
+   end in @end <command name>.  The block will be processed until
    "end_line_misc_line" in end_line.c processes the @end command. */
 ELEMENT *
 handle_block_command (ELEMENT *current, char **line_inout,
-                      enum command_id cmd, int *get_new_line)
+                      enum command_id cmd, int *get_new_line,
+                      ELEMENT **command_element)
 {
   char *line = *line_inout;
   unsigned long flags = command_data(cmd).flags;
+  ELEMENT *block = 0;
 
   /* New macro being defined. */
   if (cmd == CM_macro || cmd == CM_rmacro)
     {
-      ELEMENT *macro;
-      macro = parse_macro_command_line (cmd, &line, current);
-      add_to_element_contents (current, macro);
-      current = macro;
+      block = parse_macro_command_line (cmd, &line, current);
+      add_to_element_contents (current, block);
+      current = block;
 
       /* A new line should be read immediately after this.  */
       line = strchr (line, '\0');
@@ -797,7 +803,6 @@ handle_block_command (ELEMENT *current, char **line_inout,
     }
   else
     {
-      ELEMENT *block = 0;
       ELEMENT *bla;   /* block line arg element */
       if (command_data(cmd).data == BLOCK_menu
           && (current->type == ET_menu_comment
@@ -921,24 +926,26 @@ handle_block_command (ELEMENT *current, char **line_inout,
 
 funexit:
   *line_inout = line;
+  *command_element = block;
   return current;
 }
 
 ELEMENT *
-handle_brace_command (ELEMENT *current, char **line_inout, enum command_id cmd)
+handle_brace_command (ELEMENT *current, char **line_inout, enum command_id cmd,
+                      ELEMENT **command_element)
 {
   char *line = *line_inout;
-  ELEMENT *e;
+  ELEMENT *command_e;
 
-  e = new_element (ET_NONE);
-  e->cmd = cmd;
+  command_e = new_element (ET_NONE);
+  command_e->cmd = cmd;
 
   /* The line number information is only ever used for brace commands
      if the command is given with braces, but it's easier just to always
      store the information. */
-  e->source_info = current_source_info;
+  command_e->source_info = current_source_info;
 
-  add_to_element_contents (current, e);
+  add_to_element_contents (current, command_e);
 
   if (cmd == CM_sortas)
     {
@@ -950,17 +957,17 @@ handle_brace_command (ELEMENT *current, char 
**line_inout, enum command_id cmd)
         }
     }
 
-  current = e;
+  current = command_e;
 
   if (cmd == CM_click)
     {
-      add_extra_string_dup (e, "clickstyle", global_clickstyle);
+      add_extra_string_dup (command_e, "clickstyle", global_clickstyle);
     }
   else if (cmd == CM_kbd)
     {
       if (kbd_formatted_as_code(current))
         {
-          add_extra_integer (e, "code", 1);
+          add_extra_integer (command_e, "code", 1);
         }
     }
   else if (command_data(cmd).flags & CF_INFOENCLOSE)
@@ -968,12 +975,13 @@ handle_brace_command (ELEMENT *current, char 
**line_inout, enum command_id cmd)
       INFO_ENCLOSE *ie = lookup_infoenclose (cmd);
       if (ie)
         {
-          add_extra_string_dup (e, "begin", ie->begin);
-          add_extra_string_dup (e, "end", ie->end);
+          add_extra_string_dup (command_e, "begin", ie->begin);
+          add_extra_string_dup (command_e, "end", ie->end);
         }
-      e->type = ET_definfoenclose_command;
+      command_e->type = ET_definfoenclose_command;
     }
 
   *line_inout = line;
+  *command_element = command_e;
   return current;
 }
diff --git a/tp/Texinfo/XS/parsetexi/handle_commands.h 
b/tp/Texinfo/XS/parsetexi/handle_commands.h
index f06e7889c2..6dcc8254f9 100644
--- a/tp/Texinfo/XS/parsetexi/handle_commands.h
+++ b/tp/Texinfo/XS/parsetexi/handle_commands.h
@@ -5,13 +5,16 @@
 #include "tree_types.h"
 
 ELEMENT *handle_other_command (ELEMENT *current, char **line_inout,
-                     enum command_id cmd_id, int *status);
+                               enum command_id cmd_id, int *status,
+                               ELEMENT **command_element);
 ELEMENT *handle_line_command (ELEMENT *current, char **line_inout,
-         enum command_id cmd_id, enum command_id data_cmd, int *status);
+                              enum command_id cmd_id, enum command_id data_cmd,
+                              int *status, ELEMENT **command_element);
 ELEMENT *handle_block_command (ELEMENT *current, char **line_inout,
-                      enum command_id cmd_id, int *new_line);
+                               enum command_id cmd_id, int *new_line,
+                               ELEMENT **command_element);
 ELEMENT *handle_brace_command (ELEMENT *current, char **line_inout,
-                               enum command_id cmd_id);
+                             enum command_id cmd_id, ELEMENT 
**command_element);
 int check_no_text (ELEMENT *current);
 
 void clear_expanded_formats (void);
diff --git a/tp/Texinfo/XS/parsetexi/macro.c b/tp/Texinfo/XS/parsetexi/macro.c
index 529a3a1301..438406ede5 100644
--- a/tp/Texinfo/XS/parsetexi/macro.c
+++ b/tp/Texinfo/XS/parsetexi/macro.c
@@ -546,8 +546,10 @@ wipe_macros (void)
   macro_number = 0;
 }
 
-/* Handle macro expansion.  CMD is the macro command. */
-int
+/* Handle macro expansion.  CMD is the macro command.
+   The returned element is an out of tree element holding the call
+   arguments also associated to the macro expansion source mark */
+ELEMENT *
 handle_macro (ELEMENT *current, char **line_inout, enum command_id cmd)
 {
   char *line, *p;
@@ -714,8 +716,13 @@ handle_macro (ELEMENT *current, char **line_inout, enum 
command_id cmd)
 
  funexit:
 
+  if (error)
+    {
+      destroy_element_and_children (arguments_container);
+      arguments_container = 0;
+    }
   *line_inout = line;
-  return error;
+  return arguments_container;
 }
 
 
diff --git a/tp/Texinfo/XS/parsetexi/macro.h b/tp/Texinfo/XS/parsetexi/macro.h
index 1819f83404..6f8603d5ce 100644
--- a/tp/Texinfo/XS/parsetexi/macro.h
+++ b/tp/Texinfo/XS/parsetexi/macro.h
@@ -34,8 +34,8 @@ typedef struct {
 void new_macro (char *name, ELEMENT *macro);
 ELEMENT *parse_macro_command_line (enum command_id, char **line_inout,
                                    ELEMENT *parent);
-int handle_macro (ELEMENT *current, char **line_inout,
-                  enum command_id cmd_id);
+ELEMENT *handle_macro (ELEMENT *current, char **line_inout,
+                       enum command_id cmd_id);
 void delete_macro (char *name);
 void unset_macro_record (MACRO *m);
 MACRO *lookup_macro (enum command_id cmd);
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index df2a76d141..961c04fa39 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -1299,6 +1299,7 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
   char *line_after_command;
   int retval = STILL_MORE_TO_PROCESS;
   enum command_id end_cmd;
+  enum command_id from_alias = CM_NONE;
 
   enum command_id cmd = CM_NONE;
   /* remains set only if command is unknown, otherwise cmd is used */
@@ -1674,7 +1675,10 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
             }
         }
       if (cmd && (command_data(cmd).flags & CF_ALIAS))
-        cmd = command_data(cmd).data;
+        {
+          from_alias = cmd;
+          cmd = command_data(cmd).data;
+        }
     }
 
   /* Handle user-defined macros before anything else because their expansion
@@ -1682,11 +1686,11 @@ process_remaining_on_line (ELEMENT **current_inout, 
char **line_inout)
   if (cmd && (command_data(cmd).flags & CF_MACRO))
     {
       static char *allocated_line;
-      int expansion_error;
+      ELEMENT *macro_call_element;
 
       line = line_after_command;
-      expansion_error = handle_macro (current, &line, cmd);
-      if (!expansion_error)
+      macro_call_element = handle_macro (current, &line, cmd);
+      if (macro_call_element)
         {
           /* directly get the following input (macro expansion text) instead
              of going through the next call of process_remaining_on_line and
@@ -1697,6 +1701,10 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
           free (allocated_line);
           allocated_line = next_text (current);
           line = allocated_line;
+
+          if (from_alias != CM_NONE)
+            add_info_string_dup (macro_call_element, "alias_of",
+                                 command_name (from_alias));
         }
       retval = STILL_MORE_TO_PROCESS;
       goto funexit;
@@ -1990,6 +1998,7 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
       int def_line_continuation;
       /* command used for gathering data on the command.  For @item command */
       enum command_id data_cmd = cmd;
+      ELEMENT *command_element;
 
       debug ("COMMAND %s", command_name(cmd));
 
@@ -2183,38 +2192,43 @@ process_remaining_on_line (ELEMENT **current_inout, 
char **line_inout)
       if (command_data(data_cmd).flags & CF_nobrace)
         {
           int status;
-          current = handle_other_command (current, &line, cmd, &status);
+          current = handle_other_command (current, &line, cmd, &status,
+                                          &command_element);
           if (status == GET_A_NEW_LINE || status == FINISHED_TOTALLY)
             {
               retval = status;
-              goto funexit;
             }
         }
       else if (command_data(data_cmd).flags & CF_line)
         {
           int status;
-          current = handle_line_command (current, &line, cmd, data_cmd, 
&status);
+          current = handle_line_command (current, &line, cmd, data_cmd, 
&status,
+                                         &command_element);
           if (status == GET_A_NEW_LINE || status == FINISHED_TOTALLY)
             {
               retval = status;
-              goto funexit;
             }
         }
       else if (command_data(data_cmd).flags & CF_block)
         {
           int new_line = 0;
-          current = handle_block_command (current, &line, cmd, &new_line);
+          current = handle_block_command (current, &line, cmd, &new_line,
+                                          &command_element);
           if (new_line)
             {
               /* For @macro, to get a new line.  This is done instead of
                  doing the EMPTY TEXT code on the next time round. */
               retval = GET_A_NEW_LINE;
-              goto funexit;
             }
         }
       else if (command_data(data_cmd).flags & (CF_brace | CF_accent))
         {
-          current = handle_brace_command (current, &line, cmd);
+          current = handle_brace_command (current, &line, cmd, 
&command_element);
+        }
+      if (from_alias != CM_NONE && command_element)
+        {
+          add_info_string_dup (command_element, "alias_of",
+                               command_name (from_alias));
         }
     }
   /* "Separator" character */
diff --git a/tp/t/results/alias/alias_macro_target_removed.pl 
b/tp/t/results/alias/alias_macro_target_removed.pl
index 9fbd89a460..a1e2958fab 100644
--- a/tp/t/results/alias/alias_macro_target_removed.pl
+++ b/tp/t/results/alias/alias_macro_target_removed.pl
@@ -128,6 +128,9 @@ $result_trees{'alias_macro_target_removed'} = {
                 'extra' => {
                   'name' => 'mystrong'
                 },
+                'info' => {
+                  'alias_of' => 'new'
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/alias/alias_of_added_index.pl 
b/tp/t/results/alias/alias_of_added_index.pl
index a7c8fce298..19f2ada379 100644
--- a/tp/t/results/alias/alias_of_added_index.pl
+++ b/tp/t/results/alias/alias_of_added_index.pl
@@ -175,6 +175,7 @@ $result_trees{'alias_of_added_index'} = {
             }
           },
           'info' => {
+            'alias_of' => 'new',
             'spaces_before_argument' => {
               'text' => ' '
             }
diff --git a/tp/t/results/alias/alias_of_added_index_before_added_index.pl 
b/tp/t/results/alias/alias_of_added_index_before_added_index.pl
index 679a15a9ff..853c1ff09c 100644
--- a/tp/t/results/alias/alias_of_added_index_before_added_index.pl
+++ b/tp/t/results/alias/alias_of_added_index_before_added_index.pl
@@ -175,6 +175,7 @@ $result_trees{'alias_of_added_index_before_added_index'} = {
             }
           },
           'info' => {
+            'alias_of' => 'new',
             'spaces_before_argument' => {
               'text' => ' '
             }
diff --git a/tp/t/results/alias/alias_of_definfoenclose.pl 
b/tp/t/results/alias/alias_of_definfoenclose.pl
index b91d69158d..0203f55dda 100644
--- a/tp/t/results/alias/alias_of_definfoenclose.pl
+++ b/tp/t/results/alias/alias_of_definfoenclose.pl
@@ -108,6 +108,9 @@ $result_trees{'alias_of_definfoenclose'} = {
                 'begin' => ';',
                 'end' => ':'
               },
+              'info' => {
+                'alias_of' => 'new'
+              },
               'source_info' => {
                 'file_name' => '',
                 'line_nr' => 5,
diff --git 
a/tp/t/results/alias/alias_of_definfoenclose_before_definfoenclose.pl 
b/tp/t/results/alias/alias_of_definfoenclose_before_definfoenclose.pl
index f4372c51be..c21d0755da 100644
--- a/tp/t/results/alias/alias_of_definfoenclose_before_definfoenclose.pl
+++ b/tp/t/results/alias/alias_of_definfoenclose_before_definfoenclose.pl
@@ -108,6 +108,9 @@ 
$result_trees{'alias_of_definfoenclose_before_definfoenclose'} = {
                 'begin' => ';',
                 'end' => ':'
               },
+              'info' => {
+                'alias_of' => 'new'
+              },
               'source_info' => {
                 'file_name' => '',
                 'line_nr' => 5,
diff --git a/tp/t/results/alias/alias_of_macro.pl 
b/tp/t/results/alias/alias_of_macro.pl
index a5d606ccc2..e6ddc703c3 100644
--- a/tp/t/results/alias/alias_of_macro.pl
+++ b/tp/t/results/alias/alias_of_macro.pl
@@ -128,6 +128,9 @@ $result_trees{'alias_of_macro'} = {
                 'extra' => {
                   'name' => 'mymacro'
                 },
+                'info' => {
+                  'alias_of' => 'new'
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/alias/alias_of_macro_before_macro.pl 
b/tp/t/results/alias/alias_of_macro_before_macro.pl
index ea96a5853f..f1b66d58f9 100644
--- a/tp/t/results/alias/alias_of_macro_before_macro.pl
+++ b/tp/t/results/alias/alias_of_macro_before_macro.pl
@@ -128,6 +128,9 @@ $result_trees{'alias_of_macro_before_macro'} = {
                 'extra' => {
                   'name' => 'mymacro'
                 },
+                'info' => {
+                  'alias_of' => 'new'
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/alias/alias_table_command.pl 
b/tp/t/results/alias/alias_table_command.pl
index da078c9594..714ae5d964 100644
--- a/tp/t/results/alias/alias_table_command.pl
+++ b/tp/t/results/alias/alias_table_command.pl
@@ -55,6 +55,9 @@ $result_trees{'alias_table_command'} = {
               'contents' => [
                 {
                   'cmdname' => 'code',
+                  'info' => {
+                    'alias_of' => 'myalias'
+                  },
                   'source_info' => {
                     'file_name' => '',
                     'line_nr' => 3,
diff --git a/tp/t/results/alias/block_command_alias.pl 
b/tp/t/results/alias/block_command_alias.pl
index a17bf666e9..9f50c8c233 100644
--- a/tp/t/results/alias/block_command_alias.pl
+++ b/tp/t/results/alias/block_command_alias.pl
@@ -105,6 +105,9 @@ $result_trees{'block_command_alias'} = {
               'type' => 'preformatted'
             }
           ],
+          'info' => {
+            'alias_of' => 'lang'
+          },
           'source_info' => {
             'file_name' => '',
             'line_nr' => 3,
diff --git a/tp/t/results/alias/recursive_alias.pl 
b/tp/t/results/alias/recursive_alias.pl
index 9200509be2..6f579d4aec 100644
--- a/tp/t/results/alias/recursive_alias.pl
+++ b/tp/t/results/alias/recursive_alias.pl
@@ -143,6 +143,9 @@ $result_trees{'recursive_alias'} = {
                 }
               ],
               'cmdname' => 'strong',
+              'info' => {
+                'alias_of' => 'other'
+              },
               'source_info' => {
                 'file_name' => '',
                 'line_nr' => 7,
diff --git a/tp/t/results/alias/simple.pl b/tp/t/results/alias/simple.pl
index 30d6ffe3c6..a688d994dd 100644
--- a/tp/t/results/alias/simple.pl
+++ b/tp/t/results/alias/simple.pl
@@ -115,6 +115,9 @@ $result_trees{'simple'} = {
                 }
               ],
               'cmdname' => 'code',
+              'info' => {
+                'alias_of' => 'myalias'
+              },
               'source_info' => {
                 'file_name' => '',
                 'line_nr' => 5,
@@ -152,6 +155,7 @@ $result_trees{'simple'} = {
               ],
               'cmdname' => 'verb',
               'info' => {
+                'alias_of' => 'o-theralias',
                 'delimiter' => '!'
               },
               'source_info' => {
diff --git a/tp/t/results/alias/texinfo_command_alias.pl 
b/tp/t/results/alias/texinfo_command_alias.pl
index 88b1cc1b21..763c8a8e1f 100644
--- a/tp/t/results/alias/texinfo_command_alias.pl
+++ b/tp/t/results/alias/texinfo_command_alias.pl
@@ -128,6 +128,9 @@ $result_trees{'texinfo_command_alias'} = {
                 'extra' => {
                   'name' => 'mystrong'
                 },
+                'info' => {
+                  'alias_of' => 'strong'
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
@@ -220,6 +223,9 @@ $result_trees{'texinfo_command_alias'} = {
                 'begin' => ';',
                 'end' => ':'
               },
+              'info' => {
+                'alias_of' => 'strong'
+              },
               'source_info' => {
                 'file_name' => '',
                 'line_nr' => 11,
diff --git a/tp/t/results/alias/texinfo_command_alias_indirect.pl 
b/tp/t/results/alias/texinfo_command_alias_indirect.pl
index 26d0fcdbe0..e1494ee0bf 100644
--- a/tp/t/results/alias/texinfo_command_alias_indirect.pl
+++ b/tp/t/results/alias/texinfo_command_alias_indirect.pl
@@ -168,6 +168,9 @@ $result_trees{'texinfo_command_alias_indirect'} = {
                 'extra' => {
                   'name' => 'mystrong'
                 },
+                'info' => {
+                  'alias_of' => 'new'
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/alias/texinfo_command_alias_indirect_before.pl 
b/tp/t/results/alias/texinfo_command_alias_indirect_before.pl
index d2f5fa8c42..630503f28a 100644
--- a/tp/t/results/alias/texinfo_command_alias_indirect_before.pl
+++ b/tp/t/results/alias/texinfo_command_alias_indirect_before.pl
@@ -169,6 +169,9 @@ $result_trees{'texinfo_command_alias_indirect_before'} = {
                 }
               ],
               'cmdname' => 'strong',
+              'info' => {
+                'alias_of' => 'new'
+              },
               'source_info' => {
                 'file_name' => '',
                 'line_nr' => 9,
diff --git a/tp/t/results/macro/macro_alias_definfoenclose_defindex.pl 
b/tp/t/results/macro/macro_alias_definfoenclose_defindex.pl
index 04bdc46f58..5622575b8b 100644
--- a/tp/t/results/macro/macro_alias_definfoenclose_defindex.pl
+++ b/tp/t/results/macro/macro_alias_definfoenclose_defindex.pl
@@ -364,6 +364,9 @@ $result_trees{'macro_alias_definfoenclose_defindex'} = {
                 }
               ],
               'cmdname' => 'strong',
+              'info' => {
+                'alias_of' => 'phooindex'
+              },
               'source_info' => {
                 'file_name' => '',
                 'line_nr' => 16,
@@ -882,6 +885,9 @@ $result_trees{'macro_alias_definfoenclose_defindex'} = {
                 }
               ],
               'cmdname' => 'strong',
+              'info' => {
+                'alias_of' => 'phooindex'
+              },
               'source_info' => {
                 'file_name' => '',
                 'line_nr' => 38,
@@ -1100,6 +1106,9 @@ $result_trees{'macro_alias_definfoenclose_defindex'} = {
                 }
               ],
               'cmdname' => 'strong',
+              'info' => {
+                'alias_of' => 'phooindex'
+              },
               'source_info' => {
                 'file_name' => '',
                 'line_nr' => 47,



reply via email to

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