- Subject: Re: isearch "wrap around" enhancements
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Tue, 23 Nov 2004 11:16:03 -0500
G. Milde <g.milde@xxxxxx> wrote:
> static define get_bound_key (search_func, default)
> {
> variable n, key;
> if (n = which_key (search_func), n)
> {
> key = (); n--;
> if (strlen (key) == 2)
> {
> if (key [0] == '^')
> return (key [1] - '@');
> }
>+ _pop_n(n);
> }
> return default;
> }
Your point is well-taken and I rewrote the function as:
static define get_bound_key (search_func, default)
{
foreach ([which_key (search_func), pop()])
{
variable key = ();
if (strlen (key) == 2)
{
if (key [0] == '^')
return (key [1] - '@');
}
}
return default;
}
Thanks,
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2004 date index]
[2004 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]