Skip to content

Instantly share code, notes, and snippets.

@lateau
Created March 28, 2013 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lateau/5260613 to your computer and use it in GitHub Desktop.
Save lateau/5260613 to your computer and use it in GitHub Desktop.
Disable C-x C-c binding execute kill-emacs.
(defun dont-kill-emacs()
"Disable C-x C-c binding execute kill-emacs."
(interactive)
(error (substitute-command-keys "To exit emacs: \\[kill-emacs]")))
(global-set-key (kbd "C-x C-c") 'dont-kill-emacs)
@kulbida
Copy link

kulbida commented Jan 27, 2017

thanks!

@VernonGrant
Copy link

Awesome, you can also just use:
(global-unset-key (kbd "C-x C-c"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment