mirror of
https://github.com/plexus/chemacs2.git
synced 2026-09-10 07:26:27 -04:00
Add support for installing/enabling straight.el
This commit is contained in:
parent
abfbd9e640
commit
677cb7c21e
18
.emacs
18
.emacs
|
|
@ -68,6 +68,21 @@
|
|||
(symbol-name (read (current-buffer)) ))
|
||||
"default"))
|
||||
|
||||
(defun chemacs-load-straight ()
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 5))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun chemacs-get-emacs-profile (profile)
|
||||
(cdr (assoc profile chemacs-emacs-profiles)))
|
||||
|
||||
|
|
@ -96,6 +111,9 @@
|
|||
(setenv (car env) (cdr env)))
|
||||
(chemacs-emacs-profile-key 'env))
|
||||
|
||||
(when (chemacs-emacs-profile-key 'straight-p)
|
||||
(chemacs-load-straight))
|
||||
|
||||
;; Start the actual initialization
|
||||
(load init-file)
|
||||
|
||||
|
|
|
|||
|
|
@ -143,6 +143,8 @@ Other things you can configure
|
|||
- =env= An association list of environment variables. These will get set before
|
||||
loading the profile, so they can influence the initialization, and they are
|
||||
visible to any subprocesses spawned from Emacs.
|
||||
- =straight-p= Enable the [Straight](https://github.com/raxod502/straight.el)
|
||||
functional package manager
|
||||
|
||||
Store =.emacs-profile.el= together with your dotfiles. If you're not yet keeping
|
||||
a version controlled directory of dotfiles, then check out
|
||||
|
|
|
|||
Loading…
Reference in a new issue