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
This commit is contained in:
Henrik Lissner 2022-04-30 19:46:18 +02:00
parent 6bf725837d
commit 56686f677a
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -117,7 +117,10 @@
;;;###autoload ;;;###autoload
(defun doom/restart-and-restore (&optional debug) (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") (interactive "P")
(setq doom-autosave-session nil) (setq doom-autosave-session nil)
(doom/quicksave-session) (doom/quicksave-session)
@ -125,7 +128,8 @@
(letf! ((#'save-buffers-kill-emacs #'kill-emacs) (letf! ((#'save-buffers-kill-emacs #'kill-emacs)
(confirm-kill-emacs)) (confirm-kill-emacs))
(restart-emacs (restart-emacs
(combine-and-quote-strings
(append (if debug (list "--debug-init")) (append (if debug (list "--debug-init"))
(when (boundp 'chemacs-current-emacs-profile) (when (boundp 'chemacs-current-emacs-profile)
(list "--with-profile" chemacs-current-emacs-profile)) (list "--with-profile" chemacs-current-emacs-profile))
(list "--eval" "(add-hook 'window-setup-hook #'doom-load-session 100)"))))) (list "--eval" "(add-hook 'window-setup-hook #'doom-load-session 100)"))))))