Memoryjar
Emperor
Also, even if another religion has become majority in all of your cities (using the example above, Buddhism is your religion and Shinto was Japan's religion, and Japan converts your last city ()presumably your holy city) to Shinto), you can always spawn a Great Prophet that will be your religion (here, Buddhism), allowing you to begin reconverting your cities to your religion.
This is the point. I had many games when I preselect a unit religious unit with my only holy city not convert and the games say me «invalid faith purchase». In selection I can choose missionary or inquisitor, but same message next turn.
I conclude you have to make a religion a majority in a civilization by follower to deny religious founding or expand (exemple civ with 4 cities with pop 14-8-8-6 so 36, if you have 19 followers he's done). But in a recent game, I realized I was wrong.
But I still don't understand how I can't buy a religious unit in my holy city.