[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
menu suggestion -- perhaps take first best_guess when guessing.
From: |
Rob Browning |
Subject: |
menu suggestion -- perhaps take first best_guess when guessing. |
Date: |
Mon, 15 Sep 2003 01:26:17 -0500 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
With texinfo 4.6, if you have a dir file containing
* Guile Reference Manual: (guile). The Guile Reference Manual.
* Guile Tutorial: (guile-tut). The Guile Tutorial.
and you say "info guile" from the command line, info loads the
tutorial rather than the reference. I always felt like that was a
little counter-intuitive, so I poked around a bit and saw that it was
because the current code always takes the last best_guess when it has
to guess among equal semi-matches, rather than the first one.
The current behavior may well be what you prefer, but if not, here's a
patch that selects the first best guess instead.
One other possibility that I'd also wondered about was
case-insensitively checking the filename as a potential tie-breaker,
but that might well be the wrong idea.
Anyway, hope this helps.
--- session.c.old 2003-09-15 00:50:33.000000000 -0500
+++ session.c 2003-09-15 01:14:11.000000000 -0500
@@ -2547,7 +2562,8 @@
if (strcasecmp (entry->label, arg) == 0)
break;
else
- if (strncasecmp (entry->label, arg, strlen (arg)) == 0)
+ if ((best_guess == -1)
+ && (strncasecmp (entry->label, arg, strlen (arg)) == 0))
best_guess = i;
}
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
- menu suggestion -- perhaps take first best_guess when guessing.,
Rob Browning <=