I think Bobert was referring to Tourette syndrome.
My wife is music teacher in a Catholic elementary-school, and she says she never swears at work, though she swears like a sailor at other times & places.
I marvel at this, since she doesn't have a lot of impulse control in other respects.