jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: isearch "wrap around" enhancements


On 23.11.04, John E. Davis wrote:

> 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()])
...

Very elegant, I did not know that you can produce an array out of a
functions return arguments that easily. 

It might fail, however, if there is no key bound to search_func, e.g. 

  [which_key("bol"), pop()]

raised an SLang Error "Empty inline arrays are not supported", as
which_key("bol") returned only 0 (which is popped).

Günter

-- 
G.Milde web.de

--------------------------
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]