Shaving MILLISECONDS off our startup time!!! Fuck yes! I've measured the average startup time to be 0.68s in the previous commit, and an average of 0.52 with this commit.
26 lines
1010 B
EmacsLisp
26 lines
1010 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
|
|
"straight/repos/straight.el/bootstrap.el"))
|
|
(bootstrap-version 7))
|
|
(unless (file-exists-p bootstrap-file)
|
|
(message "Could not find Straight's bootstrap file. Attempting to download it now.")
|
|
(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-file bootstrap-file))
|
|
|
|
(setq straight-use-package-by-default t))
|