Last active
March 28, 2019 06:14
-
-
Save c02y/cadc2a108bc9d09b7a853fe69ffa291d to your computer and use it in GitHub Desktop.
alias and emacsclient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defalias 'eit-list 'benchmark-init/show-durations-tabulated) | |
;; (setq desktop-save 'ask) | |
;;desktop-save ask means always ask | |
;; (desktop-save-mode nil) | |
(setq confirm-kill-emacs 'y-or-n-p) | |
(defun ask-before-closing () | |
"Prompt for confirmation for emacsclient(not daemon) like confirm-kill-emacs for running Emacs without daemon." | |
(interactive) | |
(if (y-or-n-p (format "Really exit Emacs? ")) | |
(save-buffers-kill-terminal) | |
(message "Canceled frame close!"))) | |
(when (daemonp) | |
(global-set-key (kbd "C-x C-c") 'ask-before-closing)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment