- Subject: Re: isearch "wrap around" enhancements
- From: "G. Milde" <g.milde@xxxxxx>
- Date: Mon, 22 Nov 2004 12:17:27 +0100
Thanks to John and Lloyd for the new isearch.
On 19.11.04, John E. Davis wrote:
> I have added the patch. In doing so I wanted to clean up the code
> involving the placing of marks on the interpreter's stack. That
> portion of code is very confusing and dates from a time when slang did
> not have structured types. I believe that my new implementation is
> cleaner and more maintainable. However, there is always the
> possibility that I broke something. I would appreciate it if you try
> this version because it will be the one that I will release.
> Thanks, --John
I found one problem with get_bound_key. If there is more than one keybinding
to the search_func, this will be left on the stack resulting in an error.
To fix this, I inserted a _pop_n(n) (Another possibility would be a while(n)
loop, depending on whether you want to get the first or last binding.)
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;
}
also, my email changed,
+ %% with modifications and comments by Guenter Milde <G.Milde web.de>
I once thought about using the keypress-hooks for isearch. I think it can
make the code much simpler and "standards-compliant". (As the current
version works, however, I did not follow this thoughts any more.)
Guenter
--
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]