Skip to content

Instantly share code, notes, and snippets.

@kuanyui
Created March 4, 2014 10:39
Show Gist options
  • Save kuanyui/9344075 to your computer and use it in GitHub Desktop.
Save kuanyui/9344075 to your computer and use it in GitHub Desktop.
;;確認後再關掉 Emacs 啦
(defun save-buffers-kill-terminal-after-confirm ()
"老是不小心關掉 Emacs,揪咪。"
(interactive)
(if (yes-or-no-p "Really quit Emacs?")
(save-buffers-kill-terminal)
"好極了!"))
(global-unset-key (kbd "C-x C-c"))
(global-set-key (kbd "C-x C-c") 'save-buffers-kill-terminal-after-confirm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment