Prevent persp-mode throwing an error on kill-emacs

This would otherwise stop Emacs from quitting.
This commit is contained in:
Henrik Lissner 2018-06-29 22:23:44 +02:00
parent 9b2100dfe7
commit 2ffad42466
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -144,6 +144,12 @@ Uses `+workspaces-main' to determine the name of the main workspace."
counsel-projectile-switch-project-action #'+workspaces|switch-to-project)
(add-hook 'projectile-after-switch-project-hook #'+workspaces|switch-to-project)
;; In some scenarios, persp-mode throws error an error when Emacs tries to
;; die, preventing its death.
(defun +workspaces*ignore-errors-on-kill-emacs (orig-fn)
(ignore-errors (funcall orig-fn)))
(advice-add #'persp-kill-emacs-h :around #'+workspaces*ignore-errors-on-kill-emacs)
;;
;; eshell
(persp-def-buffer-save/load