On Tue, Apr 02, 2024 at 09:56:40PM +0100, Gavin Smith wrote:
> If a cross-reference appears like
>
> @xref{,,, texi2any_api, GNU Texinfo @command{texi2any} Output Customization}.
>
> with no first argument, then this is output in Info like
>
> *Note (texi2any_api)::.
>
> - with no node argument following the manual. The Info browser (at least
> recent versions of it; I checked 6.8 and 7.1) cannot follow such links
> (I didn't check with Emacs). However, texi2any does not warn about
> such constructs.
Here is a patch for the Info reader. It passes the tests and in a test
with a minimum info file, followed a cross-reference as above. But I
may have overlooked interactions with other parts of the code.
--
Pat
diff --git a/info/scan.c b/info/scan.c
index 4b7dfe8754..007498dabc 100644
--- a/info/scan.c
+++ b/info/scan.c
@@ -1135,7 +1135,7 @@ scan_reference_label (REFERENCE *entry, int in_index)
len = read_quoted_string (inptr + label_len, ":", max_lines,
&entry->nodename);
canonicalize_whitespace (entry->nodename);
- if (!len)
+ if (!len && !entry->filename)
return 0; /* Input invalid. */
label_len += len;
}