Yep it was for the time warp.
From "The Voyage Home":
SPOCK: Not with this equipment. I have had to program some of the variables from memory.
KIRK: What are some of the variables?
SPOCK: Availability of fuel components, mass of the vessel through a time continuum, and the probable location of humpback whales, in this case, the Pacific basin.
KIRK: You've programmed that from memory?
SPOCK: I have.
Engaging warp drive next to a high gravity body doesn't appear to be a problem in TOS, IMHO. They just won't be going very fast until they get some distance.