On most cars this can be avoided by using a little device that plugs into the cigarette lighter and has a 9 volt battery attached so that when you remove the vehicle's battery the memory in the ECM is retained and doesn't have to relearn the idle and or driving habits.
Don't know why I didn't reply to this back when it was posted, but I often have problems figuring out why I put on the clothes I did in the morning, so...........
4X4HIGH is right about that.
But, you need to buy a ready built one if you can.
I have seen folks just wire a 9 volt battery into a lighter plug. You must put a diode in series with the battery.
Otherwise, the 12 volt car battery starts charging the nonchargeable 9 volt one resulting in either having to put out a car fire, or clean up little bits of 9 volt battery out of your hand and parts of the car.
Also, the trick does not work if you have a heavy load turned on.
IOW, if you leave the doors open so that the inside lights are on or turn on the headlights while just the 9 volt is in there, it will run it down or suck it's voltage too low to maintain the memory in seconds.