Summarize this article:

Make sure to define the behavior that bothers you so your friend knows to avoid it in the future. Set a few quick ground rules so offensive comments will not become routine. For example, say, "I really just prefer to explain my sexuality on my own. Let me come out to people on my own terms. You don't need to try to define anything for me." After the confrontation, try not to dwell on the issue and wonder if you explained yourself well enough. Confronting your friend is important to help you feel that your voice is heard, but you cannot force another person to change. Acknowledge you've done what you can to explain your offense, but it's now on your friend to take your concerns to heart. If a friend doesn't listen, there need to be consequences for this. Your friend should understand that you won't tolerate the behavior to begin with. Let them know you will reconsider the friendship if such comments don't stop. For example, say something like, "I know you didn't mean anything by it, but that's not something I can tolerate. I really need you to work on this in the future, as I don't want to spend time with prejudiced people." If your friend continues to make the same kind of comments in the future, it may be time to reevaluate a friendship. You can only use the excuse of ignorance for so long. If your friend continues to be offensive, even after your boundaries have been clearly explained, you're within your right to end the friendship.

Summary:
Let the person know what types of comments to avoid in the future. Remember it's not your responsibility to change someone else. Make sure there are consequences. Walk away if the person does not change.