-
Notifications
You must be signed in to change notification settings - Fork 1
/
early-init.el
64 lines (55 loc) · 2.25 KB
/
early-init.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
;;; early-init.el --- early bird -*- no-byte-compile: t -*-
;; Maintained in emacs-config.org
(setq max-specpdl-size 13000)
(setq package-enabled-at-startup nil)
(defvar bootstrap-version)
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;;(straight-use-package `(use-package ,@(when (>= emacs-major-version 29) '(:type built-in))))
(use-package straight
:custom
(straight-use-package-by-default t)
(straight-vc-git-default-protocol 'ssh))
(use-package notifications
:demand t
:config
(notifications-notify
:title "Emacs"
:body " ... is starting up..."))
(use-package no-littering
:custom
(make-backup-files t)
:init
(setq backup-directory-alist
`(("." . ,(no-littering-expand-var-file-name "backup/"))))
(setq auto-save-file-name-transforms
`((".*" ,(no-littering-expand-var-file-name "auto-save/") t)))
(when (boundp 'native-comp-eln-load-path)
(startup-redirect-eln-cache (no-littering-expand-var-file-name "eln-cache"))))
(straight-use-package 'org)
(straight-use-package 'project)
(straight-use-package 'flymake)
;; look for a debug init file and load, trigger the debugger
(defun debug-init (&optional fname)
(let* ((fname (if fname fname "debug-init.el"))
(debug-init (expand-file-name fname user-emacs-directory)))
(if (file-exists-p debug-init)
(progn
(message "A debug-init, %s, was found, so loading." debug-init)
(let ((rgr/debug-init-debugger t)) ;; can set rgr/debug-init-debugger to false in the debug init to avoid triggering the debugger
(load-file debug-init)
(if rgr/debug-init-debugger
(debug)
(message " After loading %s `rgr/debug-init-debugger was set to nil so not debugging." debug-init))))
(message "No debug initfile, %s, found so ignoring" debug-init))))
(debug-init)