diff options
Diffstat (limited to 'early-init.el')
-rw-r--r-- | early-init.el | 70 |
1 files changed, 32 insertions, 38 deletions
diff --git a/early-init.el b/early-init.el index 0ec6fb9..5e28f4d 100644 --- a/early-init.el +++ b/early-init.el | |||
@@ -1,65 +1,59 @@ | |||
1 | ;;; early-init.el ~ acdw | 1 | ;;; early-init.el ~ acdw |
2 | 2 | ||
3 | ;;; different platforms | 3 | ;;; this needs to happen first -- speed up init |
4 | (setq my/is-windows-p (eq system-type 'windows-nt) | 4 | (setq gc-cons-threshold most-positive-fixnum) |
5 | my/is-linux-p (eq system-type 'gnu/linux) | 5 | (defvar file-name-handler-alist-old file-name-handler-alist) |
6 | ;; TODO my/is-larry-p, my/is-bax-p (hostname) | 6 | (setq file-name-handler-alist nil) |
7 | ) | 7 | (setq message-log-max 16384) |
8 | (setq byte-compile-warnings | ||
9 | '(not free-vars unresolved noruntime lexical make-local)) | ||
8 | 10 | ||
9 | (when my/is-windows-p | 11 | (add-hook 'after-init-hook |
10 | (setenv "PATH" (concat "path/to/git" ";" (getenv "PATH")))) | 12 | (lambda () |
13 | (setq file-name-handler-alist file-name-handler-alist-old) | ||
14 | (setq gc-cons-threshold (* 32 1024 1024))) | ||
15 | t) | ||
11 | 16 | ||
17 | ;;(setq debug-on-error t) | ||
12 | 18 | ||
13 | ;;; gui | 19 | ;;; different platforms |
14 | (push '(tool-bar-lines . 0) default-frame-alist) | 20 | (setq acdw/at-work (eq system-type 'windows-nt)) |
15 | (push '(menu-bar-lines . 0) default-frame-alist) | 21 | (setq acdw/at-larry (string= (system-name) "larry")) |
22 | (setq acdw/at-bax (string= (system-name) "bax")) | ||
23 | |||
24 | ;; this needs to be before bootstrapping straight.el | ||
25 | (when acdw/at-work | ||
26 | (add-to-list 'exec-path "~/bin") | ||
27 | (add-to-list 'exec-path "C:/Users/aduckworth/Downloads/PortableGit/bin")) | ||
16 | 28 | ||
17 | (unless (display-graphic-p) | 29 | ;;; gui |
18 | (tool-bar-mode -1) | 30 | (add-to-list 'default-frame-alist '(tool-bar-lines . 0)) |
19 | (menu-bar-mode -1)) | 31 | (add-to-list 'default-frame-alist '(menu-bar-lines . 0)) |
20 | (scroll-bar-mode -1) | ||
21 | (fringe-mode '(7 . 1)) | ||
22 | 32 | ||
23 | (setq inhibit-startup-buffer-menu t) | 33 | (setq inhibit-startup-buffer-menu t) |
24 | (setq inhibit-startup-screen t) | 34 | (setq inhibit-startup-screen t) |
25 | (setq inhibit-startup-echo-area-message "acdw") | ||
26 | (setq initial-buffer-choice t) | 35 | (setq initial-buffer-choice t) |
27 | (setq initial-scratch-message nil) | 36 | (setq initial-scratch-message nil) |
28 | 37 | ||
29 | ;;; straight.el ~ github.com/raxod502/straight.el | 38 | ;;; straight.el ~ github.com/raxod502/straight.el |
30 | 39 | ||
31 | ;; use use-package | 40 | (setq straight-use-package-by-default t) ; use use-package |
32 | (setq straight-use-package-by-default t) | 41 | (setq use-package-hook-name-suffix nil) ; don't assume -hook |
33 | 42 | ||
34 | ;; boostrap straight.el | 43 | ;; bootstrap |
35 | (defvar bootstrap-version) | 44 | (defvar bootstrap-version) |
36 | (let ((bootstrap-file | 45 | (let ((bootstrap-file |
37 | (expand-file-name "straight/repos/straight.el/bootstrap.el" | 46 | (expand-file-name "straight/repos/straight.el/bootstrap.el" |
38 | user-emacs-directory)) | 47 | user-emacs-directory)) |
39 | (bootstrap-version 5)) | 48 | (bootstrap-version 5)) |
40 | (unless (file-exists-p bootstrap-file) | 49 | (unless (file-exists-p bootstrap-file) |
41 | (with-current-buffer | 50 | (with-current-buffer |
42 | (url-retrieve-synchronously | 51 | (url-retrieve-synchronously |
43 | "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" | 52 | "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" |
44 | 'silent 'inhibit-cookies) | 53 | 'silent 'inhibit-cookies) |
45 | (goto-char (point-max)) | 54 | (goto-char (point-max)) |
46 | (eval-print-last-sexp))) | 55 | (eval-print-last-sexp))) |
47 | (load bootstrap-file nil 'nomessage)) | 56 | (load bootstrap-file nil 'nomessage)) |
48 | 57 | ||
49 | ;; install use-package with straight | 58 | ;; install use-package with straight |
50 | (straight-use-package 'use-package) | 59 | (straight-use-package 'use-package) |
51 | |||
52 | ;;; other init stuff | ||
53 | |||
54 | (setq gc-cons-threshold (* 256 1024 1024)) | ||
55 | (defvar file-name-handler-alist-old file-name-handler-alist) | ||
56 | (setq file-name-handler-alist nil) | ||
57 | (setq message-log-max 16384) | ||
58 | (setq byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local)) | ||
59 | |||
60 | ;; post-init | ||
61 | (add-hook 'after-init-hook | ||
62 | (lambda () | ||
63 | (setq file-name-handler-alist file-name-handler-alist-old) | ||
64 | (setq gc-cons-threshold (* 32 1024 1024))) | ||
65 | t) | ||