From da7aef9a4cc146e58f721a26da448e76a73c4195 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 14 Oct 2019 02:45:13 -0400 Subject: [PATCH] Move --restore handler to init.el #1893 --- core/autoload/sessions.el | 6 ------ init.el | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/core/autoload/sessions.el b/core/autoload/sessions.el index b0c6a6ec2..432d6a7b3 100644 --- a/core/autoload/sessions.el +++ b/core/autoload/sessions.el @@ -65,12 +65,6 @@ "TODO" (add-hook 'window-setup-hook #'doom-load-session 'append)) -;;;###autoload -(when (and command-line-args-left - (not noninteractive)) - (add-to-list 'command-switch-alist - (cons "--restore" #'doom-restore-session-handler))) - ;; ;;; Commands diff --git a/init.el b/init.el index 400e553b9..ffdaa3920 100644 --- a/init.el +++ b/init.el @@ -52,6 +52,9 @@ ;; And let 'er rip! (add-hook 'window-setup-hook #'doom-display-benchmark-h) +(when command-line-args-left + (add-to-list 'command-switch-alist + (cons "--restore" #'doom-restore-session-handler))) (doom-initialize) (doom-initialize-core)