Make minimal-emacs-load-user-init also load .elc or .eln files

This commit is contained in:
James Cherti
2025-03-12 16:24:35 -04:00
parent 07767ef19e
commit d17039f235
3 changed files with 7 additions and 7 deletions

View File

@@ -1107,7 +1107,7 @@ To prioritize MELPA over MELPA Stable, to access bleeding-edge package versions,
Add the following line to the end of your `post-init.el` file: Add the following line to the end of your `post-init.el` file:
```lisp ```lisp
(minimal-emacs-load-user-init "local.el") (minimal-emacs-load-user-init "local")
``` ```
This allows `local.el` to load, enabling custom configurations specific to the machine. This allows `local.el` to load, enabling custom configurations specific to the machine.
@@ -1147,7 +1147,7 @@ Add the following to the top of the `~/.emacs.d/pre-early-init.el` file to make
(unless (string= minimal-emacs-user-directory (unless (string= minimal-emacs-user-directory
previous-minimal-emacs-user-directory) previous-minimal-emacs-user-directory)
;; Load pre-early-init.el from the new directory ;; Load pre-early-init.el from the new directory
(minimal-emacs-load-user-init "pre-early-init.el"))) (minimal-emacs-load-user-init "pre-early-init")))
``` ```
### Are post-early-init.el and pre-init.el the same file in terms of the logic? ### Are post-early-init.el and pre-init.el the same file in terms of the logic?

View File

@@ -100,7 +100,7 @@ When set to non-nil, Emacs will automatically call `package-initialize' and
(setq minimal-emacs--stage (file-name-nondirectory init-file)) (setq minimal-emacs--stage (file-name-nondirectory init-file))
(load init-file nil t)))) (load init-file nil t))))
(minimal-emacs-load-user-init "pre-early-init.el") (minimal-emacs-load-user-init "pre-early-init")
(setq minimal-emacs--stage "early-init.el") (setq minimal-emacs--stage "early-init.el")
(setq custom-theme-directory (setq custom-theme-directory
@@ -398,7 +398,7 @@ this stage of initialization."
("melpa" . 0))) ("melpa" . 0)))
;;; Load post-early-init.el ;;; Load post-early-init.el
(minimal-emacs-load-user-init "post-early-init.el") (minimal-emacs-load-user-init "post-early-init")
(provide 'early-init) (provide 'early-init)

View File

@@ -1,4 +1,4 @@
;;; init.el --- Init -*- lexical-binding: t; -*- ;;; init.el --- Init -*- no-byte-compile: t; lexical-binding: t; -*-
;; Author: James Cherti ;; Author: James Cherti
;; URL: https://github.com/jamescherti/minimal-emacs.d ;; URL: https://github.com/jamescherti/minimal-emacs.d
@@ -17,7 +17,7 @@
;;; Load pre-init.el ;;; Load pre-init.el
(setq minimal-emacs--stage "init.el") (setq minimal-emacs--stage "init.el")
(if (fboundp 'minimal-emacs-load-user-init) (if (fboundp 'minimal-emacs-load-user-init)
(minimal-emacs-load-user-init "pre-init.el") (minimal-emacs-load-user-init "pre-init")
(error "The early-init.el file failed to loaded")) (error "The early-init.el file failed to loaded"))
(setq minimal-emacs--stage "init.el") (setq minimal-emacs--stage "init.el")
@@ -518,7 +518,7 @@
;;; Load post init ;;; Load post init
(when (fboundp 'minimal-emacs-load-user-init) (when (fboundp 'minimal-emacs-load-user-init)
(minimal-emacs-load-user-init "post-init.el")) (minimal-emacs-load-user-init "post-init"))
(setq minimal-emacs--success t) (setq minimal-emacs--success t)
(provide 'init) (provide 'init)