fix(lib): avoid doom-load-session on restart if not in Doom
If for some reason you restart into another config (or startup fails for one reason or another), don't call doom-load-session and break things.
This commit is contained in:
parent
d014a7ae8b
commit
6d0639d101
1 changed files with 4 additions and 2 deletions
|
@ -133,7 +133,9 @@ switch."
|
||||||
;; arguments at all. Should be fixed upstream, but restart-emacs seems to
|
;; arguments at all. Should be fixed upstream, but restart-emacs seems to
|
||||||
;; be unmaintained.
|
;; be unmaintained.
|
||||||
(with-temp-file tmpfile
|
(with-temp-file tmpfile
|
||||||
(print `(progn (add-hook 'window-setup-hook #'doom-load-session 100)
|
(print `(progn
|
||||||
|
(when (boundp 'doom-version)
|
||||||
|
(add-hook 'window-setup-hook #'doom-load-session 100))
|
||||||
(delete-file ,tmpfile))
|
(delete-file ,tmpfile))
|
||||||
(current-buffer)))
|
(current-buffer)))
|
||||||
(restart-emacs
|
(restart-emacs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue