In November 1977, the Buzzcocks were on a headline tour of the UK. Before a gig at the Clouds (aka the Cavendish Ballroom) in Edinburgh. They stayed in Edinburgh the night before. Pete Shelley later recalled:
"We were in the Blenheim Guest House with pints of beer, sitting in the TV room half-watching Guys and Dolls. One of the characters, Adelaide, is saying to Marlon Brando's character, 'Wait till you fall in love with someone you shouldn't have.' "I thought, 'fallen in love with someone you shouldn't have?' Hmm, that's good."
The following day Shelley wrote the lyrics of the song, in a van outside the main post office on nearby Waterloo Place. The music followed soon after. In an interview, Shelley said that the song was about a man named Francis Cookson that he lived with for about seven years. https://bit.ly/2MKMgdt