When you leave the editor, it just saves or updates whatever the editor contains. The only way to erase a procedure in XLOGO is to use the primitive eraseprocedure or erp.Exemple: erp "toto → erases the procedure toto.