[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7069] parsetexi update accent commands data
From: |
Gavin D. Smith |
Subject: |
[7069] parsetexi update accent commands data |
Date: |
Mon, 28 Mar 2016 10:17:57 +0000 |
Revision: 7069
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7069
Author: gavin
Date: 2016-03-28 10:17:57 +0000 (Mon, 28 Mar 2016)
Log Message:
-----------
parsetexi update accent commands data
Modified Paths:
--------------
trunk/tp/parsetexi/Parsetexi.pm
trunk/tp/parsetexi/api.c
trunk/tp/parsetexi/handle_commands.c
Modified: trunk/tp/parsetexi/Parsetexi.pm
===================================================================
--- trunk/tp/parsetexi/Parsetexi.pm 2016-03-28 10:06:23 UTC (rev 7068)
+++ trunk/tp/parsetexi/Parsetexi.pm 2016-03-28 10:17:57 UTC (rev 7069)
@@ -139,7 +139,7 @@
if (ref($conf->{$key}) ne 'CODE' and $key ne 'values') {
$parser->{$key} = _deep_copy($conf->{$key});
} else {
- warn "key is $key";
+ #warn "key is $key";
#$parser->{$key} = $conf->{$key};
}
@@ -176,7 +176,7 @@
return $parser;
}
-use Texinfo::Parser;
+#use Texinfo::Parser;
# Wrapper for Parser.pm:_parse_texi. We don't want to use this for the
# main tree, but it is called via some other functions like
@@ -186,10 +186,11 @@
{
my $self = shift;
my $root = shift;
-
- my $self2 = Texinfo::Parser::parser();
- $self2->{'input'} = $self->{'input'};
- return Texinfo::Parser::_parse_texi ($self2, $root);
+ ##
+ ## my $self2 = Texinfo::Parser::parser();
+ ## $self2->{'input'} = $self->{'input'};
+ ## return Texinfo::Parser::_parse_texi ($self2, $root);
+ return {};
}
use Data::Dumper;
@@ -492,16 +493,23 @@
sub indices_information($)
{
my $self = shift;
+
+ my $INDEX_NAMES;
if (!$self->{'index_names'}) {
- my $INDEX_NAMES = build_index_data ();
+ $INDEX_NAMES = build_index_data ();
$self->{'index_names'} = $INDEX_NAMES;
}
- #for my $index (keys %$INDEX_NAMES) {
- # if ($INDEX_NAMES->{$index}->{'merged_in'}) {
- # $self->{'merged_indices'}-> {$index}
- # = $INDEX_NAMES->{$index}->{'merged_in'};
- # }
- #}
+ if (!$self->{'merged_indices'}) {
+ $self->{'merged_indices'} = {};
+ $INDEX_NAMES = $self->{'index_names'};
+ for my $index (keys %$INDEX_NAMES) {
+ if ($INDEX_NAMES->{$index}->{'merged_in'}) {
+ $self->{'merged_indices'}-> {$index}
+ = $INDEX_NAMES->{$index}->{'merged_in'};
+ }
+ }
+ }
+
return ($self->{'index_names'}, $self->{'merged_indices'});
}
Modified: trunk/tp/parsetexi/api.c
===================================================================
--- trunk/tp/parsetexi/api.c 2016-03-28 10:06:23 UTC (rev 7068)
+++ trunk/tp/parsetexi/api.c 2016-03-28 10:17:57 UTC (rev 7069)
@@ -234,11 +234,12 @@
|| e->type == ET_menu_entry_name
|| e->type == ET_brace_command_arg
|| e->cmd == CM_TeX
- || (command_data(e->cmd).flags & CF_accent)
|| (command_data(e->cmd).flags & CF_brace
&& (command_data(e->cmd).data >= 0
|| command_data(e->cmd).data == BRACE_style
- || command_data(e->cmd).data == BRACE_context))
+ || command_data(e->cmd).data == BRACE_context
+ || command_data(e->cmd).data == BRACE_other
+ ))
|| e->cmd == CM_node) // FIXME special case
{
AV *av;
Modified: trunk/tp/parsetexi/handle_commands.c
===================================================================
--- trunk/tp/parsetexi/handle_commands.c 2016-03-28 10:06:23 UTC (rev
7068)
+++ trunk/tp/parsetexi/handle_commands.c 2016-03-28 10:17:57 UTC (rev
7069)
@@ -722,11 +722,16 @@
// 4841
// 258 keep_line_nr_brace_commands
+ // also 4989 sets line_nr.
+ /* The line number information is only ever used for accent commands
+ if the command is given with braces, but it's easier just to always
+ store the information. */
if (e->cmd == CM_titlefont || e->cmd == CM_anchor
|| (command_data(e->cmd).flags & CF_accent)
|| (command_data(e->cmd).flags & CF_brace
&& (command_data(e->cmd).data > 1
|| command_data(e->cmd).data == BRACE_style
+ || command_data(e->cmd).data == BRACE_other
|| command_data(e->cmd).data == BRACE_context)))
{
e->line_nr = line_nr;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7069] parsetexi update accent commands data,
Gavin D. Smith <=