refactor: adopt CalVer and reorganize core.el

Doom is adopting CalVer (starting at 21.12) and, later, I'll move Doom's
core out to a separate repo, where it'll stay with SemVer (starting at
3.0).
This commit is contained in:
Henrik Lissner 2021-10-09 19:31:21 +02:00
parent 094b4c1023
commit 68d8364aea
3 changed files with 179 additions and 172 deletions

View file

@ -11,20 +11,17 @@
;; Prevent unwanted runtime compilation for gccemacs (native-comp) users;
;; packages are compiled ahead-of-time when they are installed and site files
;; are compiled when gccemacs is installed.
;; REVIEW Remove after a month
(setq comp-deferred-compilation nil
native-comp-deferred-compilation nil)
;; In noninteractive sessions, prioritize non-byte-compiled source files to
;; prevent the use of stale byte-code. Otherwise, it saves us a little IO time
;; to skip the mtime checks on every *.elc file.
(setq load-prefer-newer noninteractive)
(setq native-comp-deferred-compilation nil)
;; In Emacs 27+, package initialization occurs before `user-init-file' is
;; loaded, but after `early-init-file'. Doom handles package initialization, so
;; we must prevent Emacs from doing it early!
(setq package-enable-at-startup nil)
(fset #'package--ensure-init-file #'ignore) ; DEPRECATED Removed in 28
;; In noninteractive sessions, prioritize non-byte-compiled source files to
;; prevent the use of stale byte-code. Otherwise, it saves us a little IO time
;; to skip the mtime checks on every *.elc file.
(setq load-prefer-newer noninteractive)
(unless (or (daemonp) noninteractive)
(let ((old-file-name-handler-alist file-name-handler-alist))
@ -42,7 +39,19 @@
;; `file-name-handler-alist' since startup we want to preserve.
(delete-dups (append file-name-handler-alist
old-file-name-handler-alist))))
(add-hook 'emacs-startup-hook #'doom-reset-file-handler-alist-h 101)))
(add-hook 'emacs-startup-hook #'doom-reset-file-handler-alist-h 101))
;; Contrary to what many Emacs users have in their configs, you don't need
;; more than this to make UTF-8 the default coding system:
(set-language-environment "UTF-8"))
;;
;;; Bootstrap
;; Contrary to what many Emacs users have in their configs, you don't need
;; more than this to make UTF-8 the default coding system:
(set-language-environment "UTF-8")
;; Ensure Doom is running out of this file's directory
(setq user-emacs-directory (file-name-directory load-file-name))