texinfo-commits
[Top][All Lists]
Advanced

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

[5542] blank line after * Menu:


From: Gavin D. Smith
Subject: [5542] blank line after * Menu:
Date: Fri, 09 May 2014 17:30:58 +0000

Revision: 5542
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5542
Author:   gavin
Date:     2014-05-09 17:30:57 +0000 (Fri, 09 May 2014)
Log Message:
-----------
blank line after * Menu:

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/info-utils.c
    trunk/info/nodemenu.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-05-09 16:27:25 UTC (rev 5541)
+++ trunk/ChangeLog     2014-05-09 17:30:57 UTC (rev 5542)
@@ -1,5 +1,16 @@
 2014-05-09  Gavin Smith  <address@hidden>
 
+       * info/info-utils.c (deleted_lines): Variable deleted.  All
+       accesses removed.
+       (scan_node_contents): [preprocess-nodes=On] Remove blank line
+       after "* Menu:" marker.
+       * info/nodemenu.c (nodemenu_format_info): Add blank line after
+       "* Menu:" marker.
+       (get_visited_nodes): Add blank line at start of node to avoid first
+       line being interpreted as a node information line.
+
+2014-05-09  Gavin Smith  <address@hidden>
+
        * info/nodes.c (info_find_file): If full path to file has been given,
        look for a loaded file with that path exactly.
        (info_find_subfile): Check if subfile was loaded with file

Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c     2014-05-09 16:27:25 UTC (rev 5541)
+++ trunk/info/info-utils.c     2014-05-09 17:30:57 UTC (rev 5542)
@@ -550,9 +550,6 @@
 static NODE **anchor_to_adjust;
 static int nodestart;
 
-/* Used to correct line offsets in index entries. */
-int deleted_lines = 0;
-
 /* Difference between the number of bytes input in the file and
    bytes output. */
 static long int output_bytes_difference;
@@ -646,7 +643,6 @@
   if (rewrite_p)
     {
       text_buffer_init (&output_buf);
-      deleted_lines = 0;
       output_bytes_difference = 0;
     }
 }
@@ -1230,8 +1226,12 @@
       if (!preprocess_nodes_p)
         entry->line_number = info_parsed_line_number;
       else
-        /* Adjust line offset in file to one in displayed text */
-        entry->line_number = info_parsed_line_number - deleted_lines;
+        /* Adjust line offset in file to one in displayed text.  This
+           does not work perfectly because we can't know exactly what
+           text will be inserted/removed: for example, due to expansion
+           of an image tag.  This subtracts 1 for a removed node information
+           line. */
+        entry->line_number = info_parsed_line_number - 1;
 
       if (found_menu_entry && !in_index)
         /* Output spaces the length of the node specifier to avoid
@@ -1339,12 +1339,8 @@
       if (!in_menu && match[0] == '\n')
         {
           in_menu = 1;
-          skip_input (strlen ("\n* Menu:"));
+          skip_input (strlen ("\n* Menu:\n"));
 
-          /* FIXME: This is all wrong - we should just set deleted_lines
-             to a fixed value. */
-          deleted_lines++;
-
           /* This is INFO_MENU_ENTRY_LABEL "|" INFO_XREF_LABEL, but
              with '*' characters escaped. */
           search_string = "\n\\* |\\*Note";

Modified: trunk/info/nodemenu.c
===================================================================
--- trunk/info/nodemenu.c       2014-05-09 16:27:25 UTC (rev 5541)
+++ trunk/info/nodemenu.c       2014-05-09 17:30:57 UTC (rev 5542)
@@ -33,8 +33,7 @@
 static const char *
 nodemenu_format_info (void)
 {
-  return _("\n\
-* Menu:\n\
+  return _("\n* Menu:\n\n\
   (File)Node                        Lines   Size   Containing File\n\
   ----------                        -----   ----   ---------------");
 }
@@ -201,6 +200,7 @@
 
   initialize_message_buffer ();
 
+  printf_to_message_buffer ("\n");
   printf_to_message_buffer
     ("%s", replace_in_documentation
      (_("Here is the menu of nodes you have recently visited.\n\




reply via email to

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