Skip to content

Commit

Permalink
[emacs] update elpaca
Browse files Browse the repository at this point in the history
  • Loading branch information
meain committed Mar 30, 2024
1 parent 0aa7d82 commit d495e79
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions emacs/.config/emacs/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@
"OpenAI API key.")

;; Setup elpaca
(defvar elpaca-core-date (list (string-to-number (format-time-string "%Y%m%d" emacs-build-time)))) ; https://github.com/progfolio/elpaca/issues/222
(defvar elpaca-installer-version 0.6)
(defvar elpaca-installer-version 0.7)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
:ref nil
:ref nil :depth 1
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
:build (:not elpaca--activate-package)))
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
Expand All @@ -71,8 +70,10 @@
(when (< emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (call-process "git" nil buffer t "clone"
(plist-get order :repo) repo)))
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
,@(when-let ((depth (plist-get order :depth)))
(list (format "--depth=%d" depth) "--no-single-branch"))
,(plist-get order :repo) ,repo))))
((zerop (call-process "git" nil buffer t "checkout"
(or (plist-get order :ref) "--"))))
(emacs (concat invocation-directory invocation-name))
Expand Down

0 comments on commit d495e79

Please sign in to comment.