texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_def_line_t


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_def_line_type), tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/Convert/Utils.pm (definition_arguments_content, definition_category_tree): determine the category, name, type and name in definition_arguments_content. Do not use def_parsed_hash in definition_category_tree. Use this information instead of def_parsed_hash in the callers.
Date: Mon, 06 Mar 2023 18:58:22 -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 89a3bb5be9 * tp/Texinfo/Convert/HTML.pm (_convert_def_line_type), 
tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm 
(_convert), tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/Convert/Utils.pm 
(definition_arguments_content, definition_category_tree): determine the 
category, name, type and name in definition_arguments_content. Do not use 
def_parsed_hash in definition_category_tree.  Use this information instead of 
def_parsed_hash in the callers.
89a3bb5be9 is described below

commit 89a3bb5be954a1980a9d349f66e5fbaae87b9feb
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Mar 7 00:58:12 2023 +0100

    * tp/Texinfo/Convert/HTML.pm (_convert_def_line_type),
    tp/Texinfo/Convert/LaTeX.pm (_convert),
    tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/Convert/Text.pm
    (_convert), tp/Texinfo/Convert/Utils.pm
    (definition_arguments_content, definition_category_tree): determine
    the category, name, type and name in definition_arguments_content.
    Do not use def_parsed_hash in definition_category_tree.  Use this
    information instead of def_parsed_hash in the callers.
---
 ChangeLog                       | 11 ++++++
 tp/Texinfo/Convert/HTML.pm      | 46 +++++++++++--------------
 tp/Texinfo/Convert/LaTeX.pm     | 30 +++++++----------
 tp/Texinfo/Convert/Plaintext.pm | 74 ++++++++++++++++++-----------------------
 tp/Texinfo/Convert/Text.pm      | 22 ++++++------
 tp/Texinfo/Convert/Utils.pm     | 56 ++++++++++++++++++++-----------
 6 files changed, 124 insertions(+), 115 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c18bd55b01..9fcc92d7eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-03-06  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_convert_def_line_type),
+       tp/Texinfo/Convert/LaTeX.pm (_convert),
+       tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/Convert/Text.pm
+       (_convert), tp/Texinfo/Convert/Utils.pm
+       (definition_arguments_content, definition_category_tree): determine
+       the category, name, type and name in definition_arguments_content.
+       Do not use def_parsed_hash in definition_category_tree.  Use this
+       information instead of def_parsed_hash in the callers.
+
 2023-03-06  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry),
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index cca9fdd2a2..2ee96f02d4 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -6715,8 +6715,9 @@ sub _convert_def_line_type($$$$)
   if (defined($index_id) and $index_id ne '' and !$self->in_multi_expanded()) {
     $index_label = " id=\"$index_id\"";
   }
-  my $arguments
-    = Texinfo::Convert::Utils::definition_arguments_content($element);
+  my ($category_element, $class_element,
+      $type_element, $name_element, $arguments)
+         = Texinfo::Convert::Utils::definition_arguments_content($element);
 
   my @classes = ();
   my $command_name;
@@ -6740,11 +6741,9 @@ sub _convert_def_line_type($$$$)
   unshift @classes, $original_command_name;
 
   my $result_type = '';
-  if ($element->{'extra'}
-      and $element->{'extra'}->{'def_parsed_hash'}
-      and $element->{'extra'}->{'def_parsed_hash'}->{'type'}) {
+  if ($type_element) {
     my $type_text = $self->_convert({'type' => '_code',
-       'contents' => [$element->{'extra'}->{'def_parsed_hash'}->{'type'}]});
+       'contents' => [$type_element]});
     if ($type_text ne '') {
       $result_type = $self->html_attribute_class('code', ['def-type']).'>'.
          $type_text .'</code>';
@@ -6756,11 +6755,9 @@ sub _convert_def_line_type($$$$)
   }
 
   my $result_name = '';
-  if ($element->{'extra'} and $element->{'extra'}->{'def_parsed_hash'}
-      and defined($element->{'extra'}->{'def_parsed_hash'}->{'name'})) {
-    my $name_content = $element->{'extra'}->{'def_parsed_hash'}->{'name'};
+  if ($name_element) {
     $result_name = $self->html_attribute_class('strong', ['def-name']).'>'.
-       $self->_convert({'type' => '_code', 'contents' => [$name_content]})
+       $self->_convert({'type' => '_code', 'contents' => [$name_element]})
        .'</strong>';
   }
 
@@ -6812,31 +6809,26 @@ sub _convert_def_line_type($$$$)
       . '>' . '[' . $category_result . ']' . "</td></tr>\n";
   }
 
-  my $category;
-  if ($element->{'extra'} and $element->{'extra'}->{'def_parsed_hash'}
-      and defined($element->{'extra'}->{'def_parsed_hash'}->{'category'})) {
-    $category = $element->{'extra'}->{'def_parsed_hash'}->{'category'};
-  }
   my $category_result = '';
   my $category_tree;
-  if (defined($category) and $category ne '') {
-    if ($element->{'extra'}->{'def_parsed_hash'}->{'class'}) {
+  if ($category_element) {
+    if ($class_element) {
       if ($command_name eq 'deftypeop'
-          and $element->{'extra'}->{'def_parsed_hash'}->{'type'}
+          and $type_element
           and $self->get_conf('deftypefnnewline') eq 'on') {
         $category_tree = $self->gdt('{category} on @code{{class}}:@* ',
-              {'category' => $category,
-              'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'}});
+              {'category' => $category_element,
+              'class' => $class_element});
       } elsif ($command_name eq 'defop' or $command_name eq 'deftypeop') {
         $category_tree = $self->gdt('{category} on @code{{class}}: ',
-              {'category' => $category,
-              'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'}});
+              {'category' => $category_element,
+              'class' => $class_element});
       } elsif ($command_name eq 'defcv' or $command_name eq 'deftypecv') {
         $category_tree = $self->gdt('{category} of @code{{class}}: ',
-              {'category' => $category,
-              'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'}});
+              {'category' => $category_element,
+              'class' => $class_element});
       }
-    } elsif ($element->{'extra'}->{'def_parsed_hash'}->{'type'}
+    } elsif ($type_element
             and ($command_name eq 'deftypefn' or $command_name eq 'deftypeop')
             and $self->get_conf('deftypefnnewline') eq 'on') {
         # FIXME if in @def* in @example and with @deftypefnnewline
@@ -6847,9 +6839,9 @@ sub _convert_def_line_type($$$$)
         # the conversion of @* in a @def* line in preformatted, nothing
         # really specific of @deftypefnnewline on.
         $category_tree = $self->gdt('{category}:@* ',
-                                    {'category' => $category});
+                                    {'category' => $category_element});
     } else {
-      $category_tree = $self->gdt('{category}: ', {'category' => $category});
+      $category_tree = $self->gdt('{category}: ', {'category' => 
$category_element});
     }
     $category_result = $self->convert_tree($category_tree);
   }
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 470528259a..e32987b4bb 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -2214,7 +2214,7 @@ sub _open_preformatted_command($$)
 {
   my $self = shift;
   my $command = shift;
-  
+
   push @{$self->{'formatting_context'}->[-1]->{'preformatted_context'}},
          $command;
   return '';
@@ -3183,7 +3183,7 @@ sub _convert($$)
                    ->{$node_arg->{'extra'}->{'normalized'}};
           my $label_element = Texinfo::Common::get_label_element($reference);
           my $reference_node_content = $label_element->{'contents'};
-          
+
           my $section_command;
           if ($reference->{'extra'}->{'associated_section'}) {
             $section_command = $reference->{'extra'}->{'associated_section'};
@@ -3367,7 +3367,7 @@ sub _convert($$)
           if (defined($name)) {
             $name_text = _convert($self, {'contents' => $name});
           }
-          
+
           if ($book ne '') {
             if (defined ($name_text)) {
               # TODO translation
@@ -4008,10 +4008,11 @@ sub _convert($$)
       $result .= _index_entry($self, $element);
     }
     if ($element->{'type'} eq 'def_line') {
-      if ($element->{'extra'} and $element->{'extra'}->{'def_parsed_hash'}
-             and %{$element->{'extra'}->{'def_parsed_hash'}}) {
-        my $arguments
+      my ($category_element, $class_element,
+          $type_element, $name_element, $arguments)
             = Texinfo::Convert::Utils::definition_arguments_content($element);
+      if (defined($category_element) or defined($class_element)
+          or defined($type_element) or defined($name_element)) {
         my $command;
         if 
($Texinfo::Common::def_aliases{$element->{'extra'}->{'def_command'}}) {
           $command
@@ -4023,12 +4024,6 @@ sub _convert($$)
         my $deftypefnnewline = ($self->get_conf('deftypefnnewline') eq 'on'
                and ($command eq 'deftypefn' or $command eq 'deftypeop'));
 
-        my $name;
-        if ($element->{'extra'}->{'def_parsed_hash'}->{'name'}) {
-          $name = $element->{'extra'}->{'def_parsed_hash'}->{'name'};
-        } else {
-          $name = '';
-        }
         my $def_space = ' ';
         if ($element->{'extra'}->{'omit_def_name_space'}) {
           $def_space = '';
@@ -4036,7 +4031,7 @@ sub _convert($$)
 
         my $converted_category;
         my $category
-          = Texinfo::Convert::Utils::definition_category_tree($self, 
$element);;
+          = Texinfo::Convert::Utils::definition_category_tree($self, $element);
         if (defined($category)) {
           # category is converted in normal text context
           my $converted = _convert($self, $category);
@@ -4067,11 +4062,10 @@ sub _convert($$)
         # the def* line except for the category is converted in code context
         push @{$self->{'formatting_context'}->[-1]->{'code'}}, 1;
 
-        if ($element->{'extra'}->{'def_parsed_hash'}->{'type'}) {
-          $def_line_result .=  _convert($self,
-            $element->{'extra'}->{'def_parsed_hash'}->{'type'});
+        if ($type_element) {
+          $def_line_result .= _convert($self, $type_element);
           if ($deftypefnnewline) {
-            if (defined($converted_category)) {
+           if (defined($converted_category)) {
               $def_line_result .= "}& $converted_category\\\\\n\\texttt{"
             } else {
               $def_line_result .= "}\\\\\n\\texttt{";
@@ -4080,7 +4074,7 @@ sub _convert($$)
             $def_line_result .= ' ';
           }
         }
-        $def_line_result .= _convert($self, $name) if $name;
+        $def_line_result .= _convert($self, $name_element) if $name_element;
         # will contain the command names that have been made known to
         # embrac, like texttt and need to have the symbol undefined
         # such that they can be redefined later
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 6d37dca520..ef0e179f35 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -3058,10 +3058,9 @@ sub _convert($$)
         }
       }
     } elsif ($element->{'type'} eq 'def_line') {
-      if ($element->{'extra'} and $element->{'extra'}->{'def_parsed_hash'}
-             and %{$element->{'extra'}->{'def_parsed_hash'}}) {
-        my $arguments
-          = Texinfo::Convert::Utils::definition_arguments_content($element);
+      my ($category, $class, $type, $name, $arguments)
+        = Texinfo::Convert::Utils::definition_arguments_content($element);
+      if ($category or $class or $type or $name) {
         my $tree;
         my $command;
         if 
($Texinfo::Common::def_aliases{$element->{'extra'}->{'def_command'}}) {
@@ -3070,12 +3069,7 @@ sub _convert($$)
         } else {
           $command = $element->{'extra'}->{'def_command'};
         }
-        my $name;
-        if ($element->{'extra'}->{'def_parsed_hash'}->{'name'}) {
-          $name = $element->{'extra'}->{'def_parsed_hash'}->{'name'};
-        } else {
-          $name = '';
-        }
+        $name = '' if (!defined($name));
 
         my $omit_def_space = $element->{'extra'}->{'omit_def_name_space'};
 
@@ -3085,10 +3079,10 @@ sub _convert($$)
             or $command eq 'deftp'
             or (($command eq 'deftypefn'
                  or $command eq 'deftypevr')
-                and !$element->{'extra'}->{'def_parsed_hash'}->{'type'})) {
+                and !defined($type))) {
           if ($arguments) {
             my $strings = {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
+             'category' => $category,
              'name' => $name,
              'arguments' => $arguments};
             if ($omit_def_space) {
@@ -3100,18 +3094,16 @@ sub _convert($$)
             }
           } else {
             $tree = $self->gdt('@tie{}-- {category}: {name}', {
-                 'category'
-                    => $element->{'extra'}->{'def_parsed_hash'}->{'category'},
+                 'category' => $category,
                  'name' => $name});
           }
         } elsif ($command eq 'deftypefn'
                  or $command eq 'deftypevr') {
           if ($arguments) {
             my $strings = {
-              'category'
-                  => $element->{'extra'}->{'def_parsed_hash'}->{'category'},
+              'category' => $category,
               'name' => $name,
-              'type' => $element->{'extra'}->{'def_parsed_hash'}->{'type'},
+              'type' => $type,
               'arguments' => $arguments};
             if ($self->get_conf('deftypefnnewline') eq 'on'
                 and $command eq 'deftypefn') {
@@ -3137,8 +3129,8 @@ sub _convert($$)
             }
           } else {
             my $strings = {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
-             'type' => $element->{'extra'}->{'def_parsed_hash'}->{'type'},
+             'category' => $category,
+             'type' => $type,
              'name' => $name};
             if ($self->get_conf('deftypefnnewline') eq 'on'
                 and $command eq 'deftypefn') {
@@ -3151,12 +3143,12 @@ sub _convert($$)
           }
         } elsif ($command eq 'defcv'
                  or ($command eq 'deftypecv'
-                     and !$element->{'extra'}->{'def_parsed_hash'}->{'type'})) 
{
+                     and !defined($type))) {
           if ($arguments) {
             my $strings = {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
+             'category' => $category,
              'name' => $name,
-             'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'},
+             'class' => $class,
              'arguments' => $arguments};
             if ($omit_def_space) {
               $tree
@@ -3169,18 +3161,18 @@ sub _convert($$)
             }
           } else {
             $tree = $self->gdt('@tie{}-- {category} of {class}: {name}', {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
-             'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'},
+             'category' => $category,
+             'class' => $class,
              'name' => $name});
           }
         } elsif ($command eq 'defop'
                  or ($command eq 'deftypeop'
-                     and !$element->{'extra'}->{'def_parsed_hash'}->{'type'})) 
{
+                     and !defined($type))) {
           if ($arguments) {
             my $strings = {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
+             'category' => $category,
              'name' => $name,
-             'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'},
+             'class' => $class,
              'arguments' => $arguments};
             if ($omit_def_space) {
               $tree
@@ -3193,17 +3185,17 @@ sub _convert($$)
             }
           } else {
             $tree = $self->gdt('@tie{}-- {category} on {class}: {name}', {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
-             'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'},
+             'category' => $category,
+             'class' => $class,
              'name' => $name});
           }
         } elsif ($command eq 'deftypeop') {
           if ($arguments) {
             my $strings = {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
+             'category' => $category,
              'name' => $name,
-             'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'},
-             'type' => $element->{'extra'}->{'def_parsed_hash'}->{'type'},
+             'class' => $class,
+             'type' => $type,
              'arguments' => $arguments};
             if ($self->get_conf('deftypefnnewline') eq 'on') {
               if ($omit_def_space) {
@@ -3228,9 +3220,9 @@ sub _convert($$)
             }
           } else {
             my $strings = {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
-             'type' => $element->{'extra'}->{'def_parsed_hash'}->{'type'},
-             'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'},
+             'category' => $category,
+             'type' => $type,
+             'class' => $class,
              'name' => $name};
             if ($self->get_conf('deftypefnnewline') eq 'on') {
               $tree
@@ -3245,10 +3237,10 @@ sub _convert($$)
         } elsif ($command eq 'deftypecv') {
           if ($arguments) {
             my $strings = {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
+             'category' => $category,
              'name' => $name,
-             'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'},
-             'type' => $element->{'extra'}->{'def_parsed_hash'}->{'type'},
+             'class' => $class,
+             'type' => $type,
              'arguments' => $arguments};
             if ($omit_def_space) {
               $tree
@@ -3261,9 +3253,9 @@ sub _convert($$)
             }
           } else {
             my $strings = {
-             'category' => 
$element->{'extra'}->{'def_parsed_hash'}->{'category'},
-             'type' => $element->{'extra'}->{'def_parsed_hash'}->{'type'},
-             'class' => $element->{'extra'}->{'def_parsed_hash'}->{'class'},
+             'category' => $category,
+             'type' => $type,
+             'class' => $class,
              'name' => $name};
             $tree
               = $self->gdt('@tie{}-- {category} of {class}: {type} {name}',
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index d11832d1b1..6c73901674 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -611,21 +611,23 @@ sub _convert($;$)
   }
   if ($element->{'type'} and $element->{'type'} eq 'def_line') {
     #print STDERR "$element->{'extra'}->{'def_command'}\n";
-    if ($element->{'extra'} and $element->{'extra'}->{'def_parsed_hash'}
-             and scalar(keys(%{$element->{'extra'}->{'def_parsed_hash'}}))) {
-      my $parsed_definition_category
-        = 
Texinfo::Convert::Utils::definition_category_tree($options->{'converter'},
-                                                       $element);
+    my ($category_element, $class_element,
+        $type_element, $name_element, $arguments)
+         = Texinfo::Convert::Utils::definition_arguments_content($element);
+
+    my $parsed_definition_category
+      = 
Texinfo::Convert::Utils::definition_category_tree($options->{'converter'},
+                                                     $element);
+    if (defined($parsed_definition_category)) {
       my @contents = ($parsed_definition_category, {'text' => ': '});
-      if ($element->{'extra'}->{'def_parsed_hash'}->{'type'}) {
-        push @contents, ($element->{'extra'}->{'def_parsed_hash'}->{'type'},
+      if ($type_element) {
+        push @contents, ($type_element,
                          {'text' => ' '});
       }
-      if ($element->{'extra'}->{'def_parsed_hash'}->{'name'}) {
-        push @contents, $element->{'extra'}->{'def_parsed_hash'}->{'name'};
+      if ($name_element) {
+        push @contents, $name_element;
       }
 
-      my $arguments = 
Texinfo::Convert::Utils::definition_arguments_content($element);
       if ($arguments) {
         push @contents, {'text' => ' '};
         push @contents, @$arguments;
diff --git a/tp/Texinfo/Convert/Utils.pm b/tp/Texinfo/Convert/Utils.pm
index f361f5b0c1..2de4d5a4cb 100644
--- a/tp/Texinfo/Convert/Utils.pm
+++ b/tp/Texinfo/Convert/Utils.pm
@@ -90,24 +90,30 @@ sub definition_arguments_content($)
 {
   my $element = shift;
 
-  return undef if (!defined($element->{'extra'})
-                    or !defined($element->{'extra'}->{'def_parsed_hash'})
-                    or !$element->{'args'}->[0]->{'contents'});
+  my ($category, $class, $type, $name, $args);
+  return ($category, $class, $type, $name, $args)
+     if (!$element->{'args'}->[0]->{'contents'});
 
   my @args = @{$element->{'args'}->[0]->{'contents'}};
   while (@args) {
-    last if (defined($args[0]->{'extra'})
-             and defined($args[0]->{'extra'}->{'def_role'})
-             and $args[0]->{'extra'}->{'def_role'} ne 'spaces'
-             and !$element->{'extra'}->{'def_parsed_hash'}
-                       ->{$args[0]->{'extra'}->{'def_role'}});
+    my $role = $args[0]->{'extra'}->{'def_role'};
+    if ($role eq 'category') {
+      $category = shift @args;
+    } elsif ($role eq 'class') {
+      $class = shift @args;
+    } elsif ($role eq 'type') {
+      $type = shift @args;
+    } elsif ($role eq 'name') {
+      $name = shift @args;
+    } elsif ($role eq 'arg' or $role eq 'typearg' or $role eq 'delimiter') {
+      last;
+    }
     shift @args;
   }
   if (scalar(@args) > 0) {
-    return \@args;
-  } else {
-    return undef;
+    $args = \@args;
   }
+  return ($category, $class, $type, $name, $args);
 }
 
 # $SELF converter argument is optional
@@ -116,11 +122,21 @@ sub definition_category_tree($$)
   my $self = shift;
   my $current = shift;
 
-  return undef if (!$current->{'extra'}
-      or !$current->{'extra'}->{'def_parsed_hash'});
-
-  my $arg_category = $current->{'extra'}->{'def_parsed_hash'}->{'category'};
-  my $arg_class = $current->{'extra'}->{'def_parsed_hash'}->{'class'};
+  return undef if (!$current->{'args'}->[0]->{'contents'});
+
+  my $arg_category;
+  my $arg_class;
+  foreach my $arg (@{$current->{'args'}->[0]->{'contents'}}) {
+    my $role = $arg->{'extra'}->{'def_role'};
+    if ($role eq 'category') {
+      $arg_category = $arg;
+    } elsif ($role eq 'class') {
+      $arg_class = $arg;
+    } elsif ($role eq 'space') {
+    } elsif ($role eq 'arg' or $role eq 'typearg' or $role eq 'delimiter') {
+      last;
+    }
+  }
 
   return $arg_category
     if (!defined($arg_class));
@@ -408,13 +424,15 @@ On strings translations, see L<Texinfo::Translations>.
 
 =over
 
-=item $arguments = definition_arguments_content($element)
+=item ($category, $class, $type, $name, $arguments) = 
definition_arguments_content($element)
 X<C<definition_arguments_content>>
 
-I<$element> should be a C<@def*> Texinfo tree element.  Texinfo elements
+I<$element> should be a C<@def*> Texinfo tree element.  The
+I<$category>, I<$class>, I<$type>, I<$name> are elements corresponding
+to the definition command line.  Texinfo elements
 on the @-command line corresponding to arguments in the function
 definition are returned in the I<$arguments> array reference.
-Arguments correspond to text following the category and the name
+Arguments correspond to text following the other elements
 on the @-command line.  If there is no argument, I<$arguments>
 will be C<undef>.
 



reply via email to

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