diff --git a/core/core-configuration-layer.el b/core/core-configuration-layer.el index ec99334a4..82901c853 100644 --- a/core/core-configuration-layer.el +++ b/core/core-configuration-layer.el @@ -577,7 +577,7 @@ refreshed during the current session." (changed-since-last-dump-p ;; dump (configuration-layer//load) - (when dotspacemacs-emacs-pdumper-executable-file + (when (spacemacs/emacs-with-pdumper-set-p) (configuration-layer/message "Layer list has changed since last dump.") (configuration-layer//dump-emacs))) (spacemacs-force-dump @@ -590,7 +590,7 @@ refreshed during the current session." ;; dumping (configuration-layer//load) (configuration-layer/message "Dumping Emacs...")) - ((and dotspacemacs-emacs-pdumper-executable-file + ((and (spacemacs/emacs-with-pdumper-set-p) (spacemacs-run-from-dump-p)) ;; dumped (configuration-layer/message @@ -598,7 +598,7 @@ refreshed during the current session." (t ;; standard loading (configuration-layer//load) - (when dotspacemacs-emacs-pdumper-executable-file + (when (spacemacs/emacs-with-pdumper-set-p) (configuration-layer/message (concat "Layer list has not changed since last time. " "Skipping dumping process!"))))) diff --git a/core/core-dumper.el b/core/core-dumper.el index f875bc7b5..e8dc56809 100644 --- a/core/core-dumper.el +++ b/core/core-dumper.el @@ -49,6 +49,11 @@ You should not used this function, it is reserved for some specific process." `(unless (eq 'dumping spacemacs-dump-mode) ,@body)) +(defun spacemacs/emacs-with-pdumper-set-p () + "Return non-nil if a portable dumper capable emacs executable is set." + (and dotspacemacs-emacs-pdumper-executable-file + (file-exists-p dotspacemacs-emacs-pdumper-executable-file))) + (defun spacemacs/dump-emacs () "Dump emacs in a subprocess." (let ((default-directory (file-name-directory