My Glaswegian friend during my schooldays spoke with a 'BBC' English accent when she spoke to everybody except her parents. When she spoke to them it was in broad Glesga. She claimed (and I've no reason to doubt her) that she did it automatically, almost without realising it.