From 1af68a6b002aadf615cef04d4e50f0d05759acf1 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 20 Jun 2020 12:01:19 +0200 Subject: [PATCH] Unbind default key binding for closing Emacs Every so often, I accidentally close Emacs by confusing C-x and C-c. To prevent this, unbind the default key binding C-x C-c for closing Emacs. Instead, we can directly call `save-buffers-kill-emacs', what is what I am usually doing. And, seriously, why should anyone close Emacs in the first place? --- init.el | 1 + 1 file changed, 1 insertion(+) diff --git a/init.el b/init.el index 360e3b7..ff3eb51 100644 --- a/init.el +++ b/init.el @@ -221,6 +221,7 @@ (bind-key [insert] nil) (bind-key [kp-insert] nil) (bind-key [remap fill-paragraph] #'endless/fill-or-unfill) + (unbind-key "C-x C-c" global-map) ;; Overwrite certain keybindings only if packages are avilable