forked from jkitchin/scimax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.el
47 lines (32 loc) · 1.34 KB
/
bootstrap.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
;;; bootstrap.el --- install use-package
;;; Commentary:
;;
;;; Code:
(package-initialize)
(when (memq system-type '(windows-nt ms-dos))
;; On windows this solves some issues checking package signatures in the gnu elpa.
(setq package-check-signature nil))
(require 'gnutls)
(when (and (string= "26" (substring emacs-version 0 2))
(null gnutls-algorithm-priority)
(not (memq system-type '(windows-nt ms-dos))))
;; This appears to be a bug in emacs 26 that prevents the gnu archive from being downloaded.
;; This solution is from https://www.reddit.com/r/emacs/comments/cdf48c/failed_to_download_gnu_archive/
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
(unless (file-exists-p (expand-file-name "archives/gnu/archive-contents" package-user-dir))
(package-refresh-contents))
(unless package--initialized (package-initialize))
(unless (package-installed-p 'diminish)
(package-refresh-contents)
(package-install 'diminish))
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile
(require 'use-package)
(when (and (boundp 'scimax-package-refresh) scimax-package-refresh)
(package-refresh-contents)))
(require 'diminish) ;; if you use :diminish
(require 'bind-key) ;; if you use any :bind variant
(provide 'bootstrap)
;;; bootstrap.el ends here