Hi Marcy, I have never refused to write a reference letter for a student, but if I feel I will have to include in such a letter something the student might not want included, I tell them so. Even if I just cannot write as good a letter as I suspect the student is expecting or as good a letter as the student would need to get serious consideration. In the case you mention, I might say, 'when you were in my class you made some homophobic remarks and I would have to include a sentence in my letter mentioning that.' Or if that were impolitic, 'Considering your performance in my course, you would probably be better off getting a letter from another prof.' Usually students take the hint and withdraw the request.