summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2013-05-18 12:53:05 +0100
committerAlan Pearce2013-05-18 12:53:05 +0100
commitaf49c8fc39c05846a144e4ecd58704c8e7079db5 (patch)
tree7297b4784181760a098b8dbdaaacdc48a0034396 /emacs
parent821fca1da57005f24e2395a07f484ba4e35320c8 (diff)
downloaddotfiles-af49c8fc39c05846a144e4ecd58704c8e7079db5.tar.lz
dotfiles-af49c8fc39c05846a144e4ecd58704c8e7079db5.tar.zst
dotfiles-af49c8fc39c05846a144e4ecd58704c8e7079db5.zip
Emacs: only delete a frame when calling exit-emacs in a daemon
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/emacs/init.el b/emacs/init.el
index c19ad14..09b6231 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -467,7 +467,9 @@ Values: `desktop', `server', `laptop'")
   :defer t
   :idle (minibuffer-depth-indicate-mode t))
 
-(defalias 'exit-emacs 'save-buffers-kill-emacs)
+(if (daemonp)
+    (defalias 'exit-emacs #'delete-frame)
+  (defalias 'exit-emacs #'save-buffers-kill-emacs))
 
 (use-package lacarte
   :bind (("M-`" . lacarte-execute-menu-command)))