Skip to content

Commit

Permalink
* init.el: prefer newer files when loading Spacemacs
Browse files Browse the repository at this point in the history
  • Loading branch information
sunlin7 authored and smile13241324 committed Nov 22, 2024
1 parent 5e15c29 commit 6e50604
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 5 additions & 5 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
(load (concat spacemacs-core-directory "core-compilation")
nil (not init-file-debug))
(load spacemacs--last-emacs-version-file t (not init-file-debug))
(when (or (not (string= spacemacs--last-emacs-version emacs-version))
(> 0 (spacemacs//dir-byte-compile-state
(concat spacemacs-core-directory "libs/"))))
(spacemacs//remove-byte-compiled-files-in-dir spacemacs-core-directory))
;; Update saved Emacs version.
(unless (string= spacemacs--last-emacs-version emacs-version)
(spacemacs//update-last-emacs-version))
Expand All @@ -57,7 +53,11 @@
;; https://github.com/syl20bnr/spacemacs/issues/11585 "Symbol's value as
;; variable is void: \213" when emacs is not built having:
;; `--without-compress-install`
(let ((please-do-not-disable-file-name-handler-alist nil))

;; Users may update Spacemacs *.el files directly without byte-compile
;; them(eg: git pull in Spacemacs folder), so we prefer newer files
(let ((load-prefer-newer t)
(please-do-not-disable-file-name-handler-alist nil))
(require 'core-spacemacs)
(spacemacs/dump-restore-load-path)
(configuration-layer/load-lock-file)
Expand Down
3 changes: 0 additions & 3 deletions layers/+spacemacs/spacemacs-defaults/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,5 @@ or `nil' to only save and not visit the file."
;; used for restoring recently killed buffers.
(add-hook 'kill-buffer-hook #'spacemacs//add-buffer-to-killed-list)

;; Don't load outdated compiled files.
(setq load-prefer-newer t)

;; Suppress the *Warnings* buffer when native compilation shows warnings.
(setq native-comp-async-report-warnings-errors 'silent)

0 comments on commit 6e50604

Please sign in to comment.