jed-users mailing list

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

infinite loop when using read_mini


Dear jed users

Consider a small file called test.sl

-------
define test()
{
  variable input;

  do
    {
       try {input = read_mini("type something","","");}

       catch UserBreakError: {return "";}
    } while (strlen(input) == 0);

  return input;
}

() = test();
--------------------

The reason I why I am trying to catch the user break is because in the non-test case version there is some slang code which should be executed after this function returns, even if the user breaked.

If I run

$ jed -l ./test.sl

and press Ctrl-G at the prompt, jed prints "Quit!" to the minibuffer and seems to hang there. What is really strange is that this does not happen if I don't call the function test() from within the slang file (ie, if I remove the last line of the file above) but instead call it from jed's slang prompt (by pressing Meta-X). There, generating a user break works as expected: test() returns "" and the code which follows the call to this function gets executed.

Can anyone reproduce this problem? Why does a function called from a file behave differently from the same function called from the prompt? I'm using the latest jed version with slang 2.0.5.

Thanks

Marv

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


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