texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/ParserNonXS.pm (_end_line_def_line):


From: Gavin D. Smith
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm (_end_line_def_line): Reorder conditional to match XS code. No functional changes.
Date: Sat, 18 Feb 2023 10:31:07 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 9efa826130 * tp/Texinfo/ParserNonXS.pm (_end_line_def_line): Reorder 
conditional to match XS code.  No functional changes.
9efa826130 is described below

commit 9efa8261308350580aaa6c353edcb02feef15574
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Feb 18 15:30:41 2023 +0000

    * tp/Texinfo/ParserNonXS.pm (_end_line_def_line):
    Reorder conditional to match XS code.  No functional changes.
---
 ChangeLog                 |  5 +++++
 tp/Texinfo/ParserNonXS.pm | 10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 357829ddbe..7ce7ee743b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-02-18  Gavin Smith <gavinsmith0123@gmail.com>
+
+       * tp/Texinfo/ParserNonXS.pm (_end_line_def_line):
+       Reorder conditional to match XS code.  No functional changes.
+
 2023-02-18  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry): remove
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 03a42fd3ca..84de15f0bb 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -3778,7 +3778,11 @@ sub _end_line_def_line($$$)
   my $arguments = _parse_def($self, $def_command, $current, $source_info);
 
   $current = $current->{'parent'};
-  if (scalar(@$arguments)) {
+  if (scalar(@$arguments) == 0) {
+    $self->_command_warn($current, $source_info,
+                         __('missing category for @%s'),
+       $current->{'extra'}->{'original_def_cmdname'});
+  } else {
     #$current->{'extra'}->{'def_args'} = $arguments;
     my $def_parsed_hash = {};
     foreach my $arg (@$arguments) {
@@ -3831,10 +3835,6 @@ sub _end_line_def_line($$$)
                            __('missing name for @%s'),
          $current->{'extra'}->{'original_def_cmdname'});
     }
-  } else {
-    $self->_command_warn($current, $source_info,
-                         __('missing category for @%s'),
-       $current->{'extra'}->{'original_def_cmdname'});
   }
   $current = $current->{'parent'};
   $current = _begin_preformatted($self, $current);



reply via email to

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