Contributors to this thread:

after all these years it still amazes me how often i fat-finger ^X^C and accidentally exit emacs...

#emacs

@toddsundsted Me too.

(setq confirm-kill-emacs 'y-or-n-p)

@gd after all these years it still amazes what i learn about emacs. thanks! 馃榾

@toddsundsted I used to share your pain - and then I unbound that key-binding (why would you want to exit #Emacs anyway?). And besides, there's always M-x save-buffers-kill-emacs if you really do want to escape for some reason 馃槵

@stevoooo

> why would you want to exit #Emacs anyway?
this is a very valid point-of-view imo.

also, @gd hooked me up with (setq confirm-kill-emacs 'y-or-n-p) and you might consider that, as well.

@toddsundsted @gd yeah, also sounds like a good option, and yet another thing that I didn't know existed despite having used Emacs for quite a while now...

@stevoooo @toddsundsted I rebound it to C-x C-c C-x C-c.

(global-unset-key (kbd "C-x C-c"))
(global-set-key (kbd "C-x C-c C-x C-c") 'kill-emacs)