[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7268] initialize contents for root commands
From: |
gavinsmith0123 |
Subject: |
[7268] initialize contents for root commands |
Date: |
Sun, 17 Jul 2016 20:24:18 +0000 (UTC) |
Revision: 7268
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7268
Author: gavin
Date: 2016-07-17 20:24:17 +0000 (Sun, 17 Jul 2016)
Log Message:
-----------
initialize contents for root commands
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Parser.pm
trunk/tp/t/results/invalid_nestings/ignored_text.pl
trunk/tp/t/results/invalid_nestings/unclosed_verb_on_section_line.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-07-17 20:07:54 UTC (rev 7267)
+++ trunk/ChangeLog 2016-07-17 20:24:17 UTC (rev 7268)
@@ -1,5 +1,11 @@
2016-07-17 Gavin Smith <address@hidden>
+ * tp/Texinfo/Parser.pm (_parse_texi) <root commands>: Initialize
+ contents here, so it will always be set.
+ (_end_line) <root commands>: Don't set contents here.
+
+2016-07-17 Gavin Smith <address@hidden>
+
* info/indices.c (apropos_in_all_indices): Only free file buffer
if we had to load it. Otherwise the file buffer could still be
referenced. Fixes crash reported by "address@hidden".
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2016-07-17 20:07:54 UTC (rev 7267)
+++ trunk/tp/Texinfo/Parser.pm 2016-07-17 20:24:17 UTC (rev 7268)
@@ -3385,7 +3385,6 @@
} elsif ($root_commands{$command}) {
$current = $current->{'contents'}->[-1];
delete $current->{'remaining_args'};
- $current->{'contents'} = [];
# associate the section (not part) with the current node.
if ($command ne 'node' and $command ne 'part') {
@@ -4563,6 +4562,9 @@
}
$misc->{'level'} = _section_level($misc);
}
+ if ($root_commands{$command}) {
+ $misc->{'contents'} = [];
+ }
# def*x
if ($def_commands{$command}) {
my $base_command = $command;
Modified: trunk/tp/t/results/invalid_nestings/ignored_text.pl
===================================================================
--- trunk/tp/t/results/invalid_nestings/ignored_text.pl 2016-07-17 20:07:54 UTC
(rev 7267)
+++ trunk/tp/t/results/invalid_nestings/ignored_text.pl 2016-07-17 20:24:17 UTC
(rev 7268)
@@ -34,6 +34,7 @@
}
],
'cmdname' => 'node',
+ 'contents' => [],
'extra' => {
'spaces_after_command' => {}
},
Modified: trunk/tp/t/results/invalid_nestings/unclosed_verb_on_section_line.pl
===================================================================
--- trunk/tp/t/results/invalid_nestings/unclosed_verb_on_section_line.pl
2016-07-17 20:07:54 UTC (rev 7267)
+++ trunk/tp/t/results/invalid_nestings/unclosed_verb_on_section_line.pl
2016-07-17 20:24:17 UTC (rev 7268)
@@ -74,6 +74,7 @@
}
],
'cmdname' => 'section',
+ 'contents' => [],
'extra' => {
'spaces_after_command' => {}
},
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7268] initialize contents for root commands,
gavinsmith0123 <=