Files
sydnix/users/crumb/programs/emacs/init-straight.el
Madeleine Sydney bfd271125e wip: refactor: Break init.el into modules
Currently, we will just throw everything into modules/ and require it.  As the
Emacs config grows in complexity, we can make the minor improvement to require
everything under glob modules/*.el without explicitly naming each feature.
Further, one could easily imagine a module system with conditionals and flags à
la Doom.
2025-01-17 16:28:45 -07:00

25 lines
919 B
EmacsLisp

;;; init-straight.el -*- lexical-binding: t; -*-
;; Bootstrap Straight.el
(defun syd-initialise-straight ()
(defvar bootstrap-version)
(setq straight-base-dir
(or (getenv "EMACS_STRAIGHT_BASE_DIR")
(error "Cannot initialise straight: $EMACS_STRAIGHT_BASE_DIR is undefined!")))
(let ((bootstrap-file
(file-name-concat straight-base-dir
"repos/straight.el/bootstrap.el"))
(bootstrap-version 7))
(unless (file-exists-p bootstrap-file)
(let* ((url "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el")
(url-buffer (url-retrieve-synchronously
url 'silent 'inhibit-cookies)))
(with-current-buffer url-buffer
(goto-char (point-max))
(eval-print-last-sexp))))
(load bootstrap-file nil 'nomessage))
(setq straight-use-package-by-default t))