From 33c7ddb09e0eae0796686c64ffa022a181145cc1 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 4 Jan 2023 23:21:15 -0600 Subject: Restart ... again ... again --- early-init.el | 86 +++++++++++++---------------------------------------------- 1 file changed, 18 insertions(+), 68 deletions(-) (limited to 'early-init.el') diff --git a/early-init.el b/early-init.el index b841ea5..3dd74e0 100644 --- a/early-init.el +++ b/early-init.el @@ -1,50 +1,14 @@ -;;; early-init.el --- Emacs early init -*- lexical-binding: t -*- +;;; early-init.el -*- lexical-binding: t -*- -;; by C. Duckworth +;; Bankruptcy: 9.4 -;; Bankruptcy: 9.3 - -;;; Debugging --- delete this when done bankrupting -(setf debug-on-error t +;; Debugging shit +(setq debug-on-error t use-package-verbose t) -;;; Speedy startup - -(defvar +emacs--startup-restore-alist nil - "Variables to restore after startup.") - -(defun +emacs-startup@restore-variables () - "Restore variables set temporarily during startup." - (dolist (v +emacs--startup-restore-alist) - (set-default (car v) (cdr v)))) -(add-hook 'after-init-hook #'+emacs-startup@restore-variables) - -(defun +set-during-startup (variable value &optional restore) - "Set VARIABLE to VALUE during startup. -If RESTORE is non-nil, restore the variable's value to it. -Otherwise, save its original value and restore to that." - (unless after-init-time - (setf (alist-get variable +emacs--startup-restore-alist) - (or restore (symbol-value variable))) - (set-default variable value))) - -(+set-during-startup 'gc-cons-threshold most-positive-fixnum) - -;;; Distraction-free startup - -(unless debug-on-error - (+set-during-startup 'inhibit-redisplay t) - (+set-during-startup 'inhibit-message t)) - -(setf warning-minimum-level :emergency) -(add-hook 'emacs-startup-hook - (defun +message-about-warnings () - (when-let ((warnings (get-buffer "*Warnings*"))) - (message "%s. %s." "There were init-time warnings" - "See the `*Warnings*' buffer.")))) - -(setf default-frame-alist '((tool-bar-lines . 0) - (menu-bar-lines . 0) +;; Frames +(setq default-frame-alist '((tool-bar-lines . 0) + ;; (menu-bar-lines . 0) (vertical-scroll-bars . nil) (horizontal-scroll-bars . nil)) frame-inhibit-implied-resize t @@ -54,42 +18,28 @@ Otherwise, save its original value and restore to that." indicate-empty-lines nil indicate-buffer-boundaries nil) -;;; Packages - +;; Packages (require 'package) - -(dolist (archive - '(("gnu-devel" . "https://elpa.gnu.org/devel/") - ("nongnu-devel" . "https://elpa.gnu.org/nongnu-devel/") - ("melpa" . "https://melpa.org/packages/"))) - (add-to-list 'package-archives archive :append)) - -(setf package-archive-priorities - '(("gnu-devel" . 2) - ("nongnu-devel" . 1) - ("melpa" . 0) - ("gnu" . 0) - ("nongnu" . 0))) - +(add-to-list 'package-archives + '("melpa" . "https://melpa.org/packages/") + :append) +(setq package-priorities '(("melpa" . 2) + ("nongnu" . 1) + ("gnu" . 0))) (package-initialize) - (unless package-archive-contents (package-refresh-contents)) -;; https://melpa.org/packages/archive-contents - -;;; Use-package - -(setf use-package-enable-imenu-support t +(setq use-package-enable-imenu-support t use-package-hook-name-suffix nil) (require 'use-package) - -(setf use-package-compute-statistics debug-on-error) +(setq use-package-compute-statistics debug-on-error) (use-package use-package-vc - :load-path "~/src/emacs/use-package-vc.el" + :load-path "~/src/emacs/use-package-vc.el/" :config (define-advice package-vc-install (:around (orig &rest args) wtf) + "Don't freak out about `package-archives' shit." (let ((package-archives nil)) (apply orig args)))) -- cgit 1.4.1-21-gabe81