mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Prevent persp-mode throwing an error on kill-emacs
This would otherwise stop Emacs from quitting.
This commit is contained in:
@ -144,6 +144,12 @@ Uses `+workspaces-main' to determine the name of the main workspace."
|
|||||||
counsel-projectile-switch-project-action #'+workspaces|switch-to-project)
|
counsel-projectile-switch-project-action #'+workspaces|switch-to-project)
|
||||||
(add-hook 'projectile-after-switch-project-hook #'+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
|
;; eshell
|
||||||
(persp-def-buffer-save/load
|
(persp-def-buffer-save/load
|
||||||
|
Reference in New Issue
Block a user