diff --git a/layers/+distributions/spacemacs-base/funcs.el b/layers/+distributions/spacemacs-base/funcs.el index bd5e9a90e..bf8649b34 100644 --- a/layers/+distributions/spacemacs-base/funcs.el +++ b/layers/+distributions/spacemacs-base/funcs.el @@ -663,9 +663,10 @@ dotspacemacs-persistent-server to be t" (defadvice save-buffers-kill-emacs (around spacemacs-really-exit activate) "Only kill emacs if a prefix is set" - (if (or spacemacs-really-kill-emacs (not dotspacemacs-persistent-server)) - ad-do-it - (spacemacs/frame-killer))) + (if (and (not spacemacs-really-kill-emacs) + (spacemacs//persistent-server-running-p)) + (spacemacs/frame-killer) + ad-do-it)) (defun spacemacs/save-buffers-kill-emacs () "Save all changed buffers and exit Spacemacs" @@ -689,10 +690,10 @@ dotspacemacs-persistent-server to be t" (defun spacemacs/frame-killer () "Kill server buffer and hide the main Emacs window" (interactive) - (condition-case-unless-debug nil + (condition-case nil (delete-frame nil 1) - (error - (make-frame-invisible nil 1)))) + (error + (make-frame-invisible nil 1)))) (defun spacemacs/toggle-frame-fullscreen () "Respect the `dotspacemacs-fullscreen-use-non-native' variable when