Rough idle and bad acceleration when warm, stalls while idling at light. on 1999 Mazda Protege

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
This first started after an alternator problem. While driving, I noticed that the battery light was on and I was losing power to all electrical systems. By the time I got to the shop the car was barely drivable; It wouldn't shift gears, it was revving up and down randomly, lights and turn signals were not working correctly, and so on.. After we replaced the alternator I first thought that all of the problems were fixed. However, after about 1 minute of driving, the car would idle dangerously low while waiting at intersections and occasionally stall. After a cold start in the morning, it would run fine for about 2 minutes until it warmed up, and then the problems would start again. Symptoms are almost identical to those in this post:

That problem was solved by replacing the distributor cap. However, to my (very limited) knowledge, the 99 Mazda protege does not have a distributor. Please correct me if I'm wrong, but if I am not, I have no clue where to start.
(1) Answer
(4) Comments
How much or how far has it been driven since the battery power was lost/disconnected? It may just need to relearn idle strategy . Try letting it idle for awhile, then drive it, should take care of itself. (Possible)
Check engine light on?
Ok I'll leave it on for a while tomorrow morning. I drive it for no more than 10 minutes total around town since I replaced the alternator, no changes yet. And no, none of the dash lights are on.
No light on is good ! Idle relearn might just take care of this. If not, possible vacuum leak, hose could have been knocked loose.
Let it idle this morning for about 15 minutes. Before I left, I revved it up to about 2000-2500 rpm and back down, no problems. But after about a minute of driving it started again. It's very weird; it only has this problem about half the times I stop. Sometimes I stop at a light and its running perfectly. Other times I have to keep my foot on the pedal to prevent it from stalling.
I am dealing with the same issue with my Mazda Protege right now (starts/drives fine until it's warmed up, then at intersections it bogs down sometimes stalling out etc.). Ever figure out what was causing this? Thanks!