I have seen Spaceballs at least ten times, although not in years. Almost all of those ten (or so) viewings came as a teen.
In the last two months, I finally got around to seeing two supremely excellent films - Lawrence of Arabia and The Bridge over the River Kwai.
And, wouldn't you know it, there are gags in Spaceballs that depend on knowledge of those films.
When Lone Star and party are traveling through the desert, the score is from Lawrence.
And when the Jawa stand-ins march, they hum the tune that the British soldiers whistled in Kwai.