mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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:
@ -133,8 +133,10 @@ switch."
|
||||
;; arguments at all. Should be fixed upstream, but restart-emacs seems to
|
||||
;; be unmaintained.
|
||||
(with-temp-file tmpfile
|
||||
(print `(progn (add-hook 'window-setup-hook #'doom-load-session 100)
|
||||
(delete-file ,tmpfile))
|
||||
(print `(progn
|
||||
(when (boundp 'doom-version)
|
||||
(add-hook 'window-setup-hook #'doom-load-session 100))
|
||||
(delete-file ,tmpfile))
|
||||
(current-buffer)))
|
||||
(restart-emacs
|
||||
(append (if debug (list "--debug-init"))
|
||||
|
Reference in New Issue
Block a user