[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/ParserNonXS.pm (_handle_line_command
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/ParserNonXS.pm (_handle_line_command) <def commands> Avoid a variable being undefined. |
Date: |
Sun, 05 Mar 2023 08:57:59 -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 a7c31a4f34 * tp/Texinfo/ParserNonXS.pm (_handle_line_command) <def
commands> Avoid a variable being undefined.
a7c31a4f34 is described below
commit a7c31a4f3422a67c2c953212b449562462908be0
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Mar 5 13:57:50 2023 +0000
* tp/Texinfo/ParserNonXS.pm (_handle_line_command) <def commands>
Avoid a variable being undefined.
---
ChangeLog | 5 +++++
tp/Texinfo/ParserNonXS.pm | 5 ++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index eabfed1296..246113a0e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-03-05 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/ParserNonXS.pm (_handle_line_command) <def commands>
+ Avoid a variable being undefined.
+
2023-03-05 Gavin Smith <gavinsmith0123@gmail.com>
* tp/t/19def.t (defline_no_params, adjacent_defline, multiple_defline)
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index afb6ac21f1..d8a7011d9d 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -5275,6 +5275,7 @@ sub _handle_line_command($$$$$$)
my $base_command = $command;
$base_command =~ s/x$//;
my $cmdname = $current->{'cmdname'};
+ $cmdname = '' if !defined($cmdname);
# check that the def*x is first after @def*, no paragraph
# in-between.
@@ -5290,9 +5291,7 @@ sub _handle_line_command($$$$$$)
->{'omit_def_name_space'} = 1;
}
my $appropriate_command = 0;
- if ($current->{'cmdname'}
- and ($current->{'cmdname'} eq $base_command
- or $current->{'cmdname'} eq 'defblock')) {
+ if ($cmdname eq $base_command or $cmdname eq 'defblock') {
$appropriate_command = 1;
}
if ($appropriate_command) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/ParserNonXS.pm (_handle_line_command) <def commands> Avoid a variable being undefined.,
Gavin D. Smith <=