jed-users mailing list

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

Re: Looping and composite conditions


Klaus Schmid <klaus.schmid@xxxxxx> wrote:
>Seems the while-loop gets infinite, if there is a translated msgstr.
>I would try to insert 'else ()= down(1);' as follows:
>
>% find the next untranslated msgstr
>   define find_untranslated ()
>   {
>      push_mark();
>      while (bol_fsearch ("msgstr"))
>        if (is_untranslated () and fsearch ("\""))
>          {
>             pop_mark(0);
>             go_right_1();
>             return;
>          }
>        else
>           ()= down(1);
>      message ("Not found");
>      pop_mark(1);
>   }

It could still loop forever if the last line starts with "msgstr" and
the first if condition fails.  It is better to use "eol()" instead of
"()=down(1)" to avoid the problem.

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


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]