jed-users mailing list

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

problem with formatting code and email.sl


Hi everyone

I am using jed 0.99.18 with Slang 2.0.5.

I have been writing this small bit of jed code which
formats a text buffer in a way I like. It seems to
work ok. The trouble is when I try to use it in email
mode (using the email.sl provided with jed).

So that my code doesn't garble the quoted part of the
message I am editing, I changed my formatting function
so that it looks like:

define format_buffer()                                
                              
{                                                     
                              
   push_spot();                                       
                              
   bob();                                             
                              
                                                      
                              
   variable mode;                                     
                              
   (mode,) = what_mode();                             
                              
                                                      
                              
   do                                                 
                              
     {                                                
                              
        bol(); push_mark(); eol();                    
                              
        variable line = bufsubstr();                  
                              
        %bol();                                       
                              
                                                      
                              
        if (strcmp(mode,"email") == 0 and
strncmp(line,">",1) == 0)                  
          {                                           
                              
             email_reformat();                        
                              
             continue;                                
                              
          }                                           
                              
                                                      
                              
        % formatting code...                          
                              
                                                      
                              
     }                                                
                              
   while (down(1) == 1);                              
                              
                                                      
                              
   pop_spot();
   return;
}

I thought this would keep my code from messing up the
quoted part of a message, but when I try to run it in
email mode jed seems to hang. Can you help me
understand why that is happening?

I have noticed that replacing the "continue;"
statement by a "return;" keeps jed from hanging, but
that is not very useful since that way my code never
gets to format any (unquoted) text which follows the
first quoted passage of the email.

Thank you in advance,

Juergen


		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.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>.


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