From 399df088966f124afde2a1faa241f0edc35c74ab Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 22 Oct 2020 20:55:21 -0500 Subject: I .. DECLARE .. BANKRUPTCY!! Why? Do you ask? I'll tell you why. awk-mode was mysteriously freezing up the whole dang program, and when I emacs -Q 'd to see what it was, it started SO FAST. So. Fast. So here we are. Trying this again. --- early-init.el | 61 ++++++----------------------------------------------------- 1 file changed, 6 insertions(+), 55 deletions(-) (limited to 'early-init.el') diff --git a/early-init.el b/early-init.el index b0314ae..5e9d585 100644 --- a/early-init.el +++ b/early-init.el @@ -1,72 +1,23 @@ -;;; early-init.el ~ acdw -*- lexical-binding: t; no-byte-compile: t -*- - -;;; Commentary: -;; `early-init.el' is new as of Emacs 27.1. It contains ... /early initiation/. -;; What does that mean? Who knows. What I /do know/ is that it runs /before/ -;; `package.el' is loaded, so I can stop it from loading, since I use `straight.el'. -;; Other than that, there's some other init stuff that needs to happen as early -;; as possible -- think bootstrap-level. - -;;; Settings - -;; (setq debug-on-error t) +;;; early-init.el -*- lexical-binding: t; no-byte-compile: t -*- (setq load-prefer-newer t) -;;; Speed up startup -(setq gc-cons-threshold most-positive-fixnum) -(defconst *acdw/gc-cons* 800000 "'Regular' garbage collection amount") - -(defvar file-name-handler-alist-old file-name-handler-alist) -(setq file-name-handler-alist nil) - -(setq message-log-max 16384) -(setq byte-compile-warnings - '(not free-vars unresolved noruntime lexical make-local)) - -;;; Restore stuff after startup -(add-hook 'after-init-hook - (lambda () - (setq file-name-handler-alist file-name-handler-alist-old) - (setq gc-cons-threshold *acdw/gc-cons*) - (garbage-collect)) - t) - -;;; Define the platforms I work on -(defconst *acdw/at-work* (eq system-type 'windows-nt)) -(defconst *acdw/at-larry* (string= (system-name) "larry")) -(defconst *acdw/at-bax* (string= (system-name) "bax")) -(defconst *acdw/at-home* (or *acdw/at-larry* *acdw/at-bax*)) - -;;;; When at work, I have to use Portable Git. -(when *acdw/at-work* - (add-to-list 'exec-path "~/bin") - (add-to-list 'exec-path "C:/Users/aduckworth/Downloads/PortableGit/bin")) - -;;; `straight.el' ~ github.com/raxod502/straight.el - -;;;; Bootstrap -;; NOTE: this doesn't work on Windows (download straight directly) +;;; Bootstrap `straight.el' (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" - user-emacs-directory)) + user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer - (url-retrieve-synchronously - "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" - 'silent 'inhibit-cookies) + (url-retrieve-synchronously + "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" + 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) ;;; Bootstrap `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) -- cgit 1.4.1-21-gabe81