Fix `spacemacs//dir-byte-compile-state` which returned nil
which broke startup after package update on emacs 29
This commit is contained in:
parent
3370a45e11
commit
a7bfe0bfd6
|
@ -45,7 +45,7 @@ nil for un-initialized, -1 for stale or orphaned *.elc,
|
||||||
|
|
||||||
(cl-defun spacemacs//dir-byte-compile-state (dir &optional update)
|
(cl-defun spacemacs//dir-byte-compile-state (dir &optional update)
|
||||||
"Get the directory byte-compile state.
|
"Get the directory byte-compile state.
|
||||||
When the UPDATE is t, will fouce update the state."
|
When the UPDATE is t, it will force update the state."
|
||||||
(let ((state (gethash dir spacemacs--dir-byte-compile-status)))
|
(let ((state (gethash dir spacemacs--dir-byte-compile-status)))
|
||||||
(when (and (not update) state)
|
(when (and (not update) state)
|
||||||
(cl-return-from spacemacs//dir-byte-compile-state state))
|
(cl-return-from spacemacs//dir-byte-compile-state state))
|
||||||
|
@ -73,16 +73,17 @@ When the UPDATE is t, will fouce update the state."
|
||||||
(pcase nil
|
(pcase nil
|
||||||
((guard (null el)) ; *.el not exists
|
((guard (null el)) ; *.el not exists
|
||||||
(puthash dir -1 spacemacs--dir-byte-compile-status)
|
(puthash dir -1 spacemacs--dir-byte-compile-status)
|
||||||
(cl-return -1))
|
(cl-return-from spacemacs//dir-byte-compile-state -1))
|
||||||
((guard (null elc)) ; *.elc not exists
|
((guard (null elc)) ; *.elc not exists
|
||||||
(when (null state)
|
(when (null state)
|
||||||
(setq state 0)))
|
(setq state 0)))
|
||||||
((guard (file-newer-than-file-p el elc)) ; *.elc is older
|
((guard (file-newer-than-file-p el elc)) ; *.elc is older
|
||||||
(puthash dir -1 spacemacs--dir-byte-compile-status)
|
(puthash dir -1 spacemacs--dir-byte-compile-status)
|
||||||
(cl-return -1))
|
(cl-return-from spacemacs//dir-byte-compile-state -1))
|
||||||
(_
|
(_
|
||||||
(setq state 1)))))
|
(setq state 1)))))
|
||||||
(puthash dir state spacemacs--dir-byte-compile-status))))
|
(puthash dir state spacemacs--dir-byte-compile-status)
|
||||||
|
state)))
|
||||||
|
|
||||||
(defun spacemacs//update-last-emacs-version ()
|
(defun spacemacs//update-last-emacs-version ()
|
||||||
"Update `spacemacs--last-emacs-version' and its saved value."
|
"Update `spacemacs--last-emacs-version' and its saved value."
|
||||||
|
|
Loading…
Reference in New Issue