Stephen King footnote, Danse Macabre - Harlan Ellison's explanation of his departure from the script team in Star Trek: the Movie:
"Paramount had been trying to get a Star Trek film in work for some time. Roddenberry was determined that his name would be on the writing credits somehow...the trouble is, he can't write for sour owl poop. His one idea, done six or seven times in the series and again in the feature film, is that the crew of the Enterprise goes into deepest space, finds God, and God turns out to be insane, or a child, or both. I'd been called in twice, prior to 1975, to discuss the story. Other writers had also been milked. Paramount couldn't make up their minds and had even kicked Gene off the project a few times, until he brought in lawyers. Then the palace guard changed at Paramount and Diller and Eisner came over from ABC and brought a cadre of their...buddies. One of them was an ex-set designer...named Mark Trabulus.
"Roddenberry suggested me as the scenarist for the film with this Trabulus, the latest...of the know-nothing duds Paramount had assigned to the troublesome project. I had a talk with Gene...about a storyline. He told me they kept wanting bigger and bigger storylines and no matter what was suggested, it wasn't big enough. I devised a storyline and Gene liked it, and set up a meeting with Trabulus for 11 December (1975). That meeting was cancelled...but we finally got together on 15 December. It was just Gene and Trabulus and me in Gene's office on the Paramount lot.
"I told them the story. It involved going to the end of the known universe to slip back through time to the Pleistocene period when Man first emerged. I postulated a parallel development of reptile life that might have developed into the dominant species on Earth had not mammals prevailed. I postulated an alien intelligence from a far galaxy where the snakes had become the dominant life form, and a snake-creature who had come to Earth in the Star Trek future, had seen its ancestors wiped out, and who had gone back into the far past of Earth to set up distortions in the time-flow so that the reptiles could beat the humans. The Enterprise goes back to set time right, finds the snake-alien, and the human crew is conftonted with the moral dilemma of whether it had the right to wipe out an entire life form just to ensure its own territorial imperative in our present and future. The story, in short, spanned all of time and all of space, with a moral and ethical problem.
"Trabulus listened to all this and sat silently for a few minutes. Then he said, 'You know, I was reading this book by a guy named Von Daniken and he proved that the Maya calendar was exactly like ours, so it must have come from aliens. Could you put in some Mayans?'
"I looked at Gene; Gene looked at me; he said nothing. I looked at Trabulus and said, 'There weren't any Mayans at the dawn of time.' And he said, 'Well, who's to know the difference?' And I said, 'I'm to know the difference. It's a dumb suggestion.' So Trabulus got very uptight and said he liked Mayans a lot and why didn't I do it if I wanted to write this picture. So I said, 'I'm a writer. I don't know what the f--k you are!' And I got up and walked out. And that was the end of my association with the Star Trek movie."