From c6ed376b1a55ffdd0b43d77639b4e062a023cd09 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sat, 15 Apr 2023 00:59:45 -0400 Subject: Bootstrap `straight.el` Some magic bootstrapping code is provided by `straight.el` which is necessary to get it installed in the first place. --- init.el | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index ba7a20e..b344c83 100644 --- a/init.el +++ b/init.el @@ -4,6 +4,34 @@ ;; Main configuration file for MMOSMacs. +;; --------------------------------------------------------------------- +;;; Package Management +;; ----------------------------------- +;; MMOSMacs uses `straight.el' for package management. +;; --------------------------------------------------------------------- + +;; --------------------------------- +;; Bootstrap `straight.el' +;; ----------------------- +;; This is some pre-written magic +;; provided by `straight.el'. Dont +;; ask me what it does. +;; --------------------------------- +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 6)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + + + ;; --------------------------------------------------------------------- ;;; File Management ;; ---------------- -- cgit v1.2.3 From cfa7e7c0b2e0537657f7b56cdd48eeee0c51a2a1 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sat, 15 Apr 2023 01:13:23 -0400 Subject: Don't load outdated code If a `.el` file is newer than its corresponding `.elc`, load the `.el`. --- init.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index b344c83..9ab7611 100644 --- a/init.el +++ b/init.el @@ -31,6 +31,20 @@ (load bootstrap-file nil 'nomessage)) +;; --------------------------------- +;; Don't load outdated code +;; ------------------------ +;; MMOSMacs is under highly active +;; development and undergoes +;; freuqent changes. The newest code +;; should always be loaded +;; --------------------------------- + +;; if a `.el' file is newer than its corresponding `.elc', load the `.el' +(setq load-prefer-newer t) + + + ;; --------------------------------------------------------------------- ;;; File Management -- cgit v1.2.3 From a57bf344902094097a48f75f452fcfbb7dc0368f Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sat, 15 Apr 2023 01:14:42 -0400 Subject: Minor formatting fix --- init.el | 1 + 1 file changed, 1 insertion(+) (limited to 'init.el') diff --git a/init.el b/init.el index 9ab7611..c1e590b 100644 --- a/init.el +++ b/init.el @@ -17,6 +17,7 @@ ;; provided by `straight.el'. Dont ;; ask me what it does. ;; --------------------------------- + (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) -- cgit v1.2.3