dump: add function spacemacs/emacs-with-pdumper-set-p
This commit is contained in:
parent
ea1b4815b8
commit
3fa3311985
|
@ -577,7 +577,7 @@ refreshed during the current session."
|
||||||
(changed-since-last-dump-p
|
(changed-since-last-dump-p
|
||||||
;; dump
|
;; dump
|
||||||
(configuration-layer//load)
|
(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/message "Layer list has changed since last dump.")
|
||||||
(configuration-layer//dump-emacs)))
|
(configuration-layer//dump-emacs)))
|
||||||
(spacemacs-force-dump
|
(spacemacs-force-dump
|
||||||
|
@ -590,7 +590,7 @@ refreshed during the current session."
|
||||||
;; dumping
|
;; dumping
|
||||||
(configuration-layer//load)
|
(configuration-layer//load)
|
||||||
(configuration-layer/message "Dumping Emacs..."))
|
(configuration-layer/message "Dumping Emacs..."))
|
||||||
((and dotspacemacs-emacs-pdumper-executable-file
|
((and (spacemacs/emacs-with-pdumper-set-p)
|
||||||
(spacemacs-run-from-dump-p))
|
(spacemacs-run-from-dump-p))
|
||||||
;; dumped
|
;; dumped
|
||||||
(configuration-layer/message
|
(configuration-layer/message
|
||||||
|
@ -598,7 +598,7 @@ refreshed during the current session."
|
||||||
(t
|
(t
|
||||||
;; standard loading
|
;; standard loading
|
||||||
(configuration-layer//load)
|
(configuration-layer//load)
|
||||||
(when dotspacemacs-emacs-pdumper-executable-file
|
(when (spacemacs/emacs-with-pdumper-set-p)
|
||||||
(configuration-layer/message
|
(configuration-layer/message
|
||||||
(concat "Layer list has not changed since last time. "
|
(concat "Layer list has not changed since last time. "
|
||||||
"Skipping dumping process!")))))
|
"Skipping dumping process!")))))
|
||||||
|
|
|
@ -49,6 +49,11 @@ You should not used this function, it is reserved for some specific process."
|
||||||
`(unless (eq 'dumping spacemacs-dump-mode)
|
`(unless (eq 'dumping spacemacs-dump-mode)
|
||||||
,@body))
|
,@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 ()
|
(defun spacemacs/dump-emacs ()
|
||||||
"Dump emacs in a subprocess."
|
"Dump emacs in a subprocess."
|
||||||
(let ((default-directory (file-name-directory
|
(let ((default-directory (file-name-directory
|
||||||
|
|
Loading…
Reference in New Issue