From 56686f677a5da8f7842255b3d6ec77c5b28ec075 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 30 Apr 2022 19:46:18 +0200 Subject: [PATCH] fix(lib): improper quoting in restart-emacs command Should be addressed upstream, but restart-emacs hasn't been updated in nearly two years, so I temporarily fix it here. Fix: #6219 --- core/autoload/sessions.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/core/autoload/sessions.el b/core/autoload/sessions.el index 0d018df6b..e32dff849 100644 --- a/core/autoload/sessions.el +++ b/core/autoload/sessions.el @@ -117,7 +117,10 @@ ;;;###autoload (defun doom/restart-and-restore (&optional debug) - "TODO" + "Restart Emacs (and the daemon, if active). + +If DEBUG (the prefix arg) is given, start the new instance with the --debug +switch." (interactive "P") (setq doom-autosave-session nil) (doom/quicksave-session) @@ -125,7 +128,8 @@ (letf! ((#'save-buffers-kill-emacs #'kill-emacs) (confirm-kill-emacs)) (restart-emacs - (append (if debug (list "--debug-init")) - (when (boundp 'chemacs-current-emacs-profile) - (list "--with-profile" chemacs-current-emacs-profile)) - (list "--eval" "(add-hook 'window-setup-hook #'doom-load-session 100)"))))) + (combine-and-quote-strings + (append (if debug (list "--debug-init")) + (when (boundp 'chemacs-current-emacs-profile) + (list "--with-profile" chemacs-current-emacs-profile)) + (list "--eval" "(add-hook 'window-setup-hook #'doom-load-session 100)"))))))