Once in a while, emacs freezes while there is unsaved progress on my buffers. When it freezes, it does not accept my C-s or save-buffer attempts. Hence I have to restart it. When I restart emacs, my edits always get lost.
Is there any functions like save-on-quit, where it will force-save right before emacs quits or freezes? or is there any alternative solution for this?