jed-users mailing list

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

Re: next_word/prev_word


On 26.04.04, Dave Kuhlman wrote:

> In case it could be useful to someone else, here is my current
> version.  It works great, or at least it works the way I like it:

...

This could be made a bit more compact, e.g.
 
define search_current_word(direction)
{
    variable word, result;
    push_mark();
    word = get_word(, 1); % try also get_word(, -1) or get_word(, direction)
    if (direction == 1)
    {
        go_right_1();
        result = fsearch(word);
    }
    else
        result = bsearch(word);
    if (result == 0)
        message(word + " not found");
    pop_mark(not(result)); % i.e. go there if result is 0
}


Günter

-- 
G.Milde at 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]