Diane Haithman contributes to Deadline’s TV coverage.

Without revealing any plot spoilers, the first episode of Modern Family’s upcoming fifth season will take on the recent legalization of same-sex marriage in California. At tonight’s onstage “table read” of the episode for an audience of Emmy voters at Fox Studios, executive producer Steven Levitan pleaded with tweeters not to spoil any surprises while at the same time acknowledging that a plot tweet was likely to escape. (Co-creator Christopher Lloyd, who sat in the audience, already had said in interviews that the “gay marriage” issue might crop up on the Emmy-winning ABC sitcom.) And after the reading, which featured most of the cast members, the writing staff was quick to talk about how the same-sex marriage issue came to the table. Jeffrey Richman — writer of the episode, titled “Suddenly Last Summer”, which premieres September 25 — joked of the June 26 Supreme Court ruling, “I’m gay, and I was happier as a writer.” Then he added, “It was great for the gays, too.”

Related: EMMYS: Comedy Series Overview

He said the writers started breaking their story “before the decision came down. We would have been extremely unlucky writers had the decision gone the other way.” Although Modern Family introduced gay couple Mitch (Jesse Tyler Ferguson) and Cam (Eric Stonestreet) in its first season, Levitan said the show had no gay writers at the time. Deadpanned the openly gay Ferguson: “Who did you vet everything through, Steve? Get a gay writer. I’m tired.”

Levitan joked that the show then hired Richman and “went super-gay” by also adding Abraham Higginbotham to the staff. Higginbotham quipped back, “I can point to five people [on the writing staff] I thought were queer the first time I saw them.” Levitan pointed out that all the writers get their chance to write for all of the characters. But, continuing the theme, he addedthat Higginbotham tends to do a lot of the writing for college-age Dunphy daughter Haley (Sarah Hyland). Replied the scribe, “It’s a pretty short leap from gay guy to 19-year-old girl.”

Other cast members at tonight’s table read included Ed O’Neill, Sofia Vergara, Ty Burrell, Julie Bowen, Ariel Winter, Rico Rodriguez, Nolan Gould and Hyland.

Related: EMMYS: ‘Modern Family’ Scribes