In an article (I can't remember where I read it) Joss Whedon said that in the 4th season, they had a choice to make. Did they want Willow to be gay or Xander. Eventually they made Willow gay, but Xander was the original choice for their gay character. THAT's why he made those homoerotic comments in season 2 and 3 and 4 and ..... LOL. I think it would have made more sense for Xander to be gay as opposed to Willow. They were already setting it up. Willow NEVER made any comments or actions that made us question her.
Xander was supposed to be gay