                      { --- End edit --- }

procedure end_edit;
begin
open_writefile(textname,textfile,false);
if file_flag then
    begin
    prompt('Writing text to file: '+textname); unprompt;
    write_text_to_file(textfile,1,text_end);
    finis:=true; index:=text_end; write(cursor2);
    end;
end; { end_edit }

procedure quit_edit;
begin
yes_flag:=false;
prompt_for_YN('Quit',false);
if yes_flag then
    begin finis:=true; index:=text_end; write(cursor2); end;
end; { quit_edit }
