texinfo-commits
[Top][All Lists]
Advanced

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

[7809] message for no xrefs in the node


From: gavinsmith0123
Subject: [7809] message for no xrefs in the node
Date: Sun, 21 May 2017 08:42:04 -0400 (EDT)

Revision: 7809
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7809
Author:   gavin
Date:     2017-05-21 08:42:04 -0400 (Sun, 21 May 2017)
Log Message:
-----------
message for no xrefs in the node

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/session.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2017-05-21 11:13:39 UTC (rev 7808)
+++ trunk/ChangeLog     2017-05-21 12:42:04 UTC (rev 7809)
@@ -1,3 +1,10 @@
+2017-05-21  Gavin Smith  <address@hidden>
+
+       * info/session.c (info_xref_item): Give an error message if
+       there are no cross-references in the node, to be consistent
+       with 'menu-item'.  This happened in Texinfo 5.2 and earlier.
+       Report from Benno Schulenberg.
+
 2017-05-20  Gavin Smith  <address@hidden>
 
        * doc/info-stnd.texi (Custom Key Bindings): Correct '\xr' to 

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2017-05-21 11:13:39 UTC (rev 7808)
+++ trunk/info/session.c        2017-05-21 12:42:04 UTC (rev 7809)
@@ -2462,7 +2462,24 @@
 DECLARE_INFO_COMMAND
   (info_xref_item, _("Read a footnote or cross reference and select its node"))
 {
-  info_menu_or_ref_item (window, 0, 1, 1);
+  if (window->node->references)
+    {
+      REFERENCE **r;
+      
+      /* Check if there is a cross-reference in this node. */
+      for (r = window->node->references; *r; r++)
+        if ((*r)->type == REFERENCE_XREF)
+          break;
+
+      if (*r)
+        {
+          info_menu_or_ref_item (window, 0, 1, 1);
+          return;
+        }
+    }
+
+  info_error ("%s", msg_no_xref_node);
+  return;
 }
 
 /* Position the cursor at the start of this node's menu. */




reply via email to

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