Fix some issues with persistent server

* frame killer logic wasn't correct when server not running
* even when debugging, we want to kill spacemacs
This commit is contained in:
ralesi 2016-12-08 20:40:52 -07:00 committed by Eivind Fonn
parent ea54e6863e
commit a518d14c69
1 changed files with 7 additions and 6 deletions

View File

@ -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