I run emacs in konsole terminals in KDE. If I accidentally alt-F4 such a window, it dies with emacs and I lose unsaved data.
I believe it is emacs responding to A SIGTERM sent by the Alt-F4, as opposed to konsole.
Is there any way to change how emacs responds to a SIGTERM?