M Sorry to repost this, but I got a fix for it, so it will work with VMS 5.1-1. 0 also, I forgot to explain what it did last time.  K The procedures will do a couple of things.  First, whenever you edit a mail K message, a signature will be added to the end of the message when you press N Ctrl-Z.  This happens only when you edit mail.  If you don't want it, you can J simply press "Do" and type "exit".  If you'd like the signature in anotherO place, you can make a line with ".sig" and nothing else, and the signature will M be located there.  The signature is found in the file "Sys$Login:.signature".   L When you reply to a mail message, in addition to the .signature, the messageM that you are replying to will be quoted.  Each line will be preceded by "=> " I and the message "You write: " will appear at the top.  If you accidently  O quote a message, you may use the procedure "mail unquote" (it's an EVE command) L to undo the quote.  The only thing it doesn't undo is the mail header.  WhenI the header is removed, it is stuck in a buffer called, originally enough, J header.  The header is defined simply as all lines up to and including the first blank line.   I You may wish to set mail to automatically extract and edit upon reply and  forward, and edit on send.  N The way these determine if you are editing mail is through the file name.  If O you have a file named "mail_*_edit.tmp", it will think it is a mail file.  I've O never had problems, and I've used these for quite a while now.  Please, send me G mail if you have any problems.  Again, my thanks to Alberto Gomide for  M adjusting these to work under VMS 5.1-1.  Instructions on use follow.  If you < don't understand them, just send me email and I'll help you.       Cheers,   
        Darrin    ------------------------
 Instructions:    If you use a TPU Command file:  K     If you have an existing TPU command file (not an EVE command file) then D     you must merge this with your existing file.  Make sure that theF     procedures are above any lines that come by themselves.  You don'tE     want to have the "Procedure TPU$Local_Init" and it's accompanying #     "EndProcedure;" to be in there.   J     If you don't have an existing command file, simply extract this into aF     file, get rid of all extraneous lines, and define a logical called%     TPU$Command to point to the file.    If you use a section file:  K     First, extract this and delete all extraneous lines.  It doesn't matter M     what the filename is, but we'll call it "mail.tpu" for our purposes here. H     Edit the file and uncomment the lines "Procedure TPU$Local_Init" and8     it's accompanying "EndProcedure;", you'll need them.  I     Now, say "edit/tpu/com=mail.tpu".  When in the editor, simply use the J     command "save extended eve", and give it the name of your section file%     at the prompt.  You're now ready.  ----------------------- = ---------Cut here for procedures----------------------------- N !There are a few changes.  First, it now adds the line "You write:" at the topN !of the message.  Also, if you don't want the signature at the bottom, you canO !use the ".sig" directive.  Just put it at the the beginning of a line, and the N !signature will be inserted there.  If you don't want the signature, go to theM !command line and type exit.  There is also a new procedure mail unquote.  It E !will undo what the quote does, except for restoration of the header.   N !This will allow me to quote people in mail.  The EVE command 'mailquote' will !accomplish this task  Procedure Eve_Mail_Quote   Local Here;       On_Error        Position(Here);        Delete(Here);        Return    EndOn_Error;   *    Position(Beginning_Of(current_buffer));      Here:=mark(free_cursor);   (    If (Here=End_Of(current_buffer)) Then         Return	    EndIf;   /    Message('Quoting included message text...');       Copy_Text(" You write: ");     Split_Line;      Loop          Copy_Text('=> ');        Position(Line_Begin);        Move_Vertical(1); 8       ExitIf (mark(free_cursor)=End_Of(current_buffer));      EndLoop;       Split_Line;    Split_Line;    Move_Vertical(-1); N !uncomment the next line and you will be left in a position to begin typing in< !in your message.  As it is, you can edit their text easily. !   Position(Here);     Delete(Here);  
 EndProcedure;   ) !This will unquote accidently quoted text  Procedure Eve_Mail_UnQuote   Local Here, scrat;      On_Error        Position(Here);        Delete(Here);        Return    EndOn_Error;   *    Position(Beginning_Of(current_buffer));      Here:=mark(free_cursor);   (    If (Here=End_Of(current_buffer)) Then         Return; 	    EndIf;   1    Message('Unquoting included message text...');       Erase_Line;      Loop          Position(Line_Begin);        Erase_Character(3);        Move_Vertical(1); 8       ExitIf (mark(free_cursor)=End_Of(current_buffer));      EndLoop;       Move_Vertical(-2);   G !  if (edit(current_line,trim,not_in_place)="") then Erase_Line; endif; G !  if (edit(current_line,trim,not_in_place)="") then Erase_Line; endif; )    scrat:=current_line; edit(scrat,trim); G    if (scrat                               ="") then Erase_Line; endif; )    scrat:=current_line; edit(scrat,trim); G    if (scrat                               ="") then Erase_Line; endif;       Position(Here);    Delete(Here);  
 EndProcedure;   7 !This will remove the header from the received message. 2 !It will delete lines until it finds a blank line. Procedure mdc$Remove_Header   * Local Here,theline,therange,select1,scrat;      On_Error        Position(Here);        Delete(Here);        therange:=0;,       message('Error deleting Mail Header');       Return(False);    EndOn_Error;       set(line_number,on);       Here:=mark(free_cursor);   *    Position(Beginning_Of(current_buffer));C    if (mark(free_cursor)=end_of(current_buffer)) then return endif;       therange:=select(none);      Loop 2 !     ExitIf(Edit(current_line,Trim,In_Place)="");,       scrat:=current_line; edit(scrat,trim);2       ExitIf(scrat                           ="");       move_vertical(1);     EndLoop;       move_vertical(1);      select1:=select_range;       position(header_buffer);     move_text(select1);      Position(Here);    Delete(Here);      therange:=0;   
 EndProcedure;   L !This will be used if the .sig file needs to be appended to the message upon+ !exit.  This is for use with Mail messages.  Procedure mdc$exit   Local thesig,thebuffer;       On_Error #       Message(message_text(error));        Return(False);    EndOn_Error;    !Use the correct buffer...    thebuffer:=mainbuffer;  !  show(thebuffer);   O !First, look to see if they put in the ".sig" directive.  It must be by itself,  !at the beginning of a line.  H    thesig:=Search_Quietly(line_begin&".sig",Reverse,No_Exact,thebuffer);      if (thesig<>0) then  H       !if they included the .sig directive, go there, and erase the line       Position(thesig);        Erase_Line;       else   9       !Go to the bottom of the buffer, the correct buffer "       Position(End_Of(thebuffer));  	    endif;   4 !Tell them about it, then read the signature file in6    Message("Appending .signature file to message...");(    Read_File("Sys$Scratch:.Signature.");  C !Update the display so they can see the .signature file in there...     Update(current_window);  " !Lastly, call EVE's exit procedure    eve_exit;  
 EndProcedure;   8 !uncomment the next line if you are using a section file !Procedure TPU$Local_Init    mainbuffer:=current_buffer;   % !First, get the name and extension... I if (File_Parse(get_info(Command_Line,"Output_File"),'','',Name)<>'') Then J    file_name:=File_Parse(get_info(Command_Line,"Output_File"),"","",Name);I    file_ext:=File_Parse(get_info(Command_Line,"Output_File"),"","",Type);  ElseH    file_name:=File_Parse(get_info(Command_Line,"File_Name"),"","",Name);G    file_ext:=File_Parse(get_info(Command_Line,"File_Name"),"","",Type);  EndIf;  4 !Now, find out if this is actually a mail message...   !See if it is "Mail_*_Edit.Txt" G If ((index(file_name,"MAIL_")<>0) and ((index(file_name,"_SEND")<>0) or H     (index(file_name,"_EDIT")<>0)) and (index(file_ext,".TMP")<>0)) then   IsItMail:=1;)   header_buffer:=create_buffer("HEADER"); !   set(no_write,header_buffer,on);    mdc$remove_header;   EVE_Mail_Quote; +   Define_Key("mdc$exit",ctrl_z_key,"Exit");  Else   IsItMail:=0; ! Undefine_Key(ctrl_z_key); +   Define_Key("eve_exit",ctrl_z_key,"Exit");  EndIf;  ; !uncomment the next line if you are using a section file...  !EndProcedure;= ----end of procedures----------------------------------------   ( Write if you have questions or comments-   	Darrin    mdchaney@iubacs  mdchaney@bronze.ucs.indiana.edu  mdchaney@rose.ucs.indiana.edu  /* ---------- */  