Even though the odometer is working, unless you've actually measured the distance, you don't know for sure that's it's staying accurate. It could be recording the mileage inaccurately with the speedometer jumping in and out like it is. It could be a speedo drive cable being corroded, or the speedo drive gear on the transmission end of the cable, that's worn. Old cables are often corroded internally. It's an easy job to remove the cable from the transmission to check the condition of the drive gear on the trans end of the cable. Only takes a few minutes to do. Your speedometer's internal drive gears could also be nearly worn out but I think that would be a rarity. In that case you'd have to visit a salvage yard to get another unit, or buy one from Ebay.
Removing the entire cable isn't hard either. You can lay in the floorboard and reach up behind the speedo to unclip the cable. It takes some finagling with some flat blade screwdrivers and maybe some needle nose pliers, and often some twisting/pulling, but it will come loose eventually. Wear some safety glass because you will drop the pliers or screwdriver and it'll fall flat on your face in the process. Often, the square internal portion of the cable is wedged in to the back of the speedo pretty bad, so expect some struggling. There's also a single bolt holding it to the floorboard/firewall behind the vinyl flooring or carpet.
Once the cable is removed, you can hang it up and keep oiling one end until the oil starts running through it, cleaning it out. Maybe even use some brake parts cleaner first if you like. Then oil it. I stay away from using grease inside of the speedo cables because it's too sticky and can cause speedo needle bounce, or the speedo can end up slower to react to speed changes, and too much grease can also break the internal cable. Removing the inner cable is probably the best route to take here..
The last time I had my speedo cable out, I removed the internal cable (square drive end) by pulling it apart, cleaned it with brake parts cleaner, greased it VERY LIGHTLY, and put it back inside the outer cable, then I sprayed a good bit of WD40 in to the cable to thin the grease out. It worked perfectly after that for several months, but I did end up using a new Mustang cable when I switched to a T5 during my V8 swap.
Hopefully that will get you started in solving your issue.
GB
