Jeeps/Mopar products in general are prone to losing their idle settings in the PCM after a low voltage condition/dead battery. Usually starting them and manually using the throttle to keep them running for a few minutes will restore the settings.
Glad to hear you got the old iron out and going again...one of these days I'll finish replacing the wiring harness on my old YJ and get it going again.
I've had this issue on more than one occasion. After the computer reset its self the problem was gone.