texinfo-commits
[Top][All Lists]
Advanced

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

[7554] parsetexi update


From: gavinsmith0123
Subject: [7554] parsetexi update
Date: Sun, 18 Dec 2016 15:21:34 +0000 (UTC)

Revision: 7554
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7554
Author:   gavin
Date:     2016-12-18 15:21:33 +0000 (Sun, 18 Dec 2016)
Log Message:
-----------
parsetexi update

Modified Paths:
--------------
    trunk/tp/parsetexi/Parsetexi.pm
    trunk/tp/parsetexi/end_line.c

Modified: trunk/tp/parsetexi/Parsetexi.pm
===================================================================
--- trunk/tp/parsetexi/Parsetexi.pm     2016-12-11 17:38:52 UTC (rev 7553)
+++ trunk/tp/parsetexi/Parsetexi.pm     2016-12-18 15:21:33 UTC (rev 7554)
@@ -104,7 +104,6 @@
   my $conf = shift;
 
   my %parser_blanks = (
-    'labels' => {},
     'targets' => [],
     'extra' => {},
     'info' => {},
@@ -454,8 +453,7 @@
 {
   my $self = shift;
 
-  if (!defined $self->{'labels'}
-       and defined $self->{'targets'}) {
+  if (defined $self->{'targets'}) {
     my %labels = ();
     for my $target (@{$self->{'targets'}}) {
       if ($target->{'cmdname'} eq 'node') {

Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c       2016-12-11 17:38:52 UTC (rev 7553)
+++ trunk/tp/parsetexi/end_line.c       2016-12-18 15:21:33 UTC (rev 7554)
@@ -2212,58 +2212,27 @@
 
           if (index_entry) // 2822
             {
-              ELEMENT *index_contents = new_element (ET_NONE);
-              ELEMENT *e;
-              int translation_used = 0, i;
+              ELEMENT *index_contents = 0;
 
               // 2824
-              if (class)
-                {
-                  if (def_command == CM_defop
+              if (class &&
+                  (def_command == CM_defop
                       || def_command == CM_deftypeop
                       || def_command == CM_defmethod
-                      || def_command == CM_deftypemethod)
-                    {
-                      /* NAME on CLASS */
-
-                      add_to_contents_as_array (index_contents, name);
-
-                      e = new_element (ET_NONE);
-                      /* TODO should translate this */
-                      text_append (&e->text, " on ");
-                      add_to_contents_as_array (index_contents, e);
-
-                      add_to_contents_as_array (index_contents, class);
-                      translation_used = 1;
-                    }
-                  else if (def_command == CM_defivar
-                           || def_command == CM_deftypeivar
-                           || def_command == CM_deftypecv)
-                    {
-                      /* NAME of CLASS */
-                      add_to_contents_as_array (index_contents, name);
-
-                      e = new_element (ET_NONE);
-                      /* TODO should translate this */
-                      text_append (&e->text, " of ");
-                      add_to_contents_as_array (index_contents, e);
-
-                      add_to_contents_as_array (index_contents, class);
-                      translation_used = 1;
-                    }
+                      || def_command == CM_deftypemethod
+                      || def_command == CM_defivar
+                      || def_command == CM_deftypeivar
+                      || def_command == CM_deftypecv))
+                {
+                  add_extra_string (current->parent, "documentlanguage",
+                                    global_documentlanguage);
                 }
-              index_contents->parent_type = route_not_in_tree;
-
-              if (index_contents->contents.number == 0)
-                add_to_contents_as_array (index_contents, index_entry);
-              if (translation_used)
+              else
                 {
-                  for (i = 0; i < index_contents->contents.number; i++)
-                    {
-                      index_contents->contents.list[i]->parent = 0;
-                      /* These elements appear in both the main tree
-                         and in the index information. */
-                    }
+                  index_contents = new_element (ET_NONE);
+                  index_contents->parent_type = route_not_in_tree;
+                  if (index_contents->contents.number == 0)
+                    add_to_contents_as_array (index_contents, index_entry);
                 }
 
               enter_index_entry (def_command,




reply via email to

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