Rewrite to take advantage of outshine-mode
This commit is contained in:
parent
0535e49ae8
commit
c64216002b
127
early-init.el
127
early-init.el
|
@ -1,60 +1,67 @@
|
||||||
;;; early-init.el ~ acdw
|
;;; early-init.el ~ acdw -*- lexical-binding: t; coding: utf-8; fill-column: 85 -*-
|
||||||
|
|
||||||
;;; this needs to happen first -- speed up init
|
;;; Commentary:
|
||||||
(setq gc-cons-threshold most-positive-fixnum)
|
;; `early-init.el' is new as of Emacs 27.1. It contains ... /early initiation/.
|
||||||
(defvar file-name-handler-alist-old file-name-handler-alist)
|
;; What does that mean? Who knows. What I /do know/ is that it runs /before/
|
||||||
(setq file-name-handler-alist nil)
|
;; `package.el' is loaded, so I can stop it from loading, since I use `straight.el'.
|
||||||
(setq message-log-max 16384)
|
;; Other than that, there's some other init stuff that needs to happen as early
|
||||||
(setq byte-compile-warnings
|
;; as possible -- think bootstrap-level.
|
||||||
'(not free-vars unresolved noruntime lexical make-local))
|
|
||||||
|
;;; Speed up startup
|
||||||
(add-hook 'after-init-hook
|
(setq gc-cons-threshold most-positive-fixnum)
|
||||||
(lambda ()
|
|
||||||
(setq file-name-handler-alist file-name-handler-alist-old)
|
(defvar file-name-handler-alist-old file-name-handler-alist)
|
||||||
(setq gc-cons-threshold (* 32 1024 1024)))
|
(setq file-name-handler-alist nil)
|
||||||
t)
|
|
||||||
|
(setq message-log-max 16384)
|
||||||
;;(setq debug-on-error t)
|
(setq byte-compile-warnings
|
||||||
|
'(not free-vars unresolved noruntime lexical make-local))
|
||||||
;;; different platforms
|
|
||||||
(defconst *acdw/at-work* (eq system-type 'windows-nt))
|
;;; Restore stuff after startup
|
||||||
(defconst *acdw/at-larry* (string= (system-name) "larry"))
|
(add-hook 'after-init-hook
|
||||||
(defconst *acdw/at-bax* (string= (system-name) "bax"))
|
(lambda ()
|
||||||
(defconst *acdw/at-home* (or *acdw/at-larry* *acdw/at-bax*))
|
(setq file-name-handler-alist file-name-handler-alist-old)
|
||||||
|
(setq gc-cons-threshold (* 32 1024 1024))
|
||||||
;; this needs to be before bootstrapping straight.el
|
(garbage-collect))
|
||||||
(when *acdw/at-work*
|
t)
|
||||||
(add-to-list 'exec-path "~/bin")
|
|
||||||
(add-to-list 'exec-path "C:/Users/aduckworth/Downloads/PortableGit/bin"))
|
;; (setq debug-on-error t)
|
||||||
|
|
||||||
;;; gui
|
;;; Define the platforms I work on
|
||||||
(add-to-list 'default-frame-alist '(tool-bar-lines . 0))
|
(defconst *acdw/at-work* (eq system-type 'windows-nt))
|
||||||
(add-to-list 'default-frame-alist '(menu-bar-lines . 0))
|
(defconst *acdw/at-larry* (string= (system-name) "larry"))
|
||||||
|
(defconst *acdw/at-bax* (string= (system-name) "bax"))
|
||||||
(setq inhibit-startup-buffer-menu t)
|
(defconst *acdw/at-home* (or *acdw/at-larry* *acdw/at-bax*))
|
||||||
(setq inhibit-startup-screen t)
|
|
||||||
(setq initial-buffer-choice t)
|
;;;; When at work, I have to use Portable Git.
|
||||||
(setq initial-scratch-message nil)
|
(when *acdw/at-work*
|
||||||
|
(add-to-list 'exec-path "~/bin")
|
||||||
;;; straight.el ~ github.com/raxod502/straight.el
|
(add-to-list 'exec-path "C:/Users/aduckworth/Downloads/PortableGit/bin"))
|
||||||
|
|
||||||
(setq straight-use-package-by-default t) ; use use-package
|
;;; `straight.el' ~ github.com/raxod502/straight.el
|
||||||
(setq use-package-hook-name-suffix nil) ; don't assume -hook
|
|
||||||
|
;;;; Bootstrap
|
||||||
;; bootstrap
|
;; NOTE: this doesn't work on Windows (download straight directly)
|
||||||
(defvar bootstrap-version)
|
(defvar bootstrap-version)
|
||||||
(let ((bootstrap-file
|
(let ((bootstrap-file
|
||||||
(expand-file-name "straight/repos/straight.el/bootstrap.el"
|
(expand-file-name "straight/repos/straight.el/bootstrap.el"
|
||||||
user-emacs-directory))
|
user-emacs-directory))
|
||||||
(bootstrap-version 5))
|
(bootstrap-version 5))
|
||||||
(unless (file-exists-p bootstrap-file)
|
(unless (file-exists-p bootstrap-file)
|
||||||
(with-current-buffer
|
(with-current-buffer
|
||||||
(url-retrieve-synchronously
|
(url-retrieve-synchronously
|
||||||
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
||||||
'silent 'inhibit-cookies)
|
'silent 'inhibit-cookies)
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(eval-print-last-sexp)))
|
(eval-print-last-sexp)))
|
||||||
(load bootstrap-file nil 'nomessage))
|
(load bootstrap-file nil 'nomessage))
|
||||||
|
|
||||||
;; install use-package with straight
|
;;; Bootstrap `use-package'
|
||||||
(straight-use-package 'use-package)
|
(setq-default use-package-verbose nil
|
||||||
|
use-package-expand-minimally t
|
||||||
|
use-package-enable-imenu-support t
|
||||||
|
use-package-hook-name-suffix nil)
|
||||||
|
|
||||||
|
(straight-use-package 'use-package)
|
||||||
|
|
||||||
|
(setq straight-use-package-by-default t)
|
||||||
|
|
Loading…
Reference in New Issue