Lost sketch code after computer crashed

My computer (MacBook Pro) crashed just as I was uploading a newly compiled sketch I had been working on for some time to a teensy 3.1. When my computer restarted and reloaded the apps including Arduino my code was back to where it was about an hour ago.

So now I have my teensy running the latest version of the code that I spent an hour on to get working but I have lost the source code!

(i) Does Arduino keep an ‘autosave’ of the code anywhere where I could retrieve it?
(ii) Is there a copy of the source code in the most recent build files somewhere where I could retrieve that?

(Obviously I realise I should have been pressing save during the code writing)

thanks.

I think temporary files are created, but I don't know where they are on a MacBook. I also don't know if they will be deleted when you start Arduino IDE again. Can you do a search for 'arduino' and also search for hidden temporary files ?