if(saveUndo != null) saveUndo.die();  undo.addEdit(saveUndo = new SaveUndo());
	public void setDirty(boolean d)	{		boolean old_d = getFlag(DIRTY);		if(d)		{			if(getFlag(LOADING) || getFlag(READ_ONLY))				return;			if(getFlag(DIRTY) && getFlag(AUTOSAVE_DIRTY))				return;			setFlag(DIRTY,true);			setFlag(AUTOSAVE_DIRTY,true);		}		else		{			// remember the undo associated with a clean buffer,			// so that if we ever return to that undo we can			// clear the dirty flag			saveUndo = undo.editToBeUndone();			setFlag(DIRTY,false);			setFlag(AUTOSAVE_DIRTY,false);		}		if(d != old_d)			EditBus.send(new BufferUpdate(this,BufferUpdate.DIRTY_CHANGED));	}