displaying function name

Thorsten Haude yoo at vranx.de
Mon Aug 30 21:45:29 CEST 2004


Hi,

* Offer Kaye wrote (2004-08-30 09:47):
>On Mon, 30 Aug 2004 17:07:47 +1000, Michael Smith wrote:
>> #F11
>> #Open the file named at the cursor
>> define open_file_at_cursor
>> {
>>     start=search("^",$cursor,"regex","backward")
>>     end=search(": ",$cursor)
>>     eol=search("$",$cursor,"regex")
>>     filename=get_range(start,end)
>>     detail=get_range(end,eol)
>>     details=split(detail,"\w","regex")
>>     for(item in details)
>>     {
>>       final = final "_" item
>>     }
>>     command="open-mark " filename " \"" final "\""
>>     t_print(command "\n")
>>     shell_command(command,"")
>> }
>> 
>
>Hi,
>Does this work? I get an error message when I try to use it: 
>"Error executing macro: variable not set: final"

You can avoid this error by setting final to the empty string before
any work is done. You might also want to check whether final is still
the empty string after the loop.


Thorsten
-- 
There are 10 types of people in the world:
Those who understand binary, and those who don't.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.nedit.org/pipermail/discuss/attachments/20040830/f0568e01/attachment.bin


More information about the Discuss mailing list