From a37d086a20b4df96da79047d9369aef43ba0108b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 8 Sep 2020 20:54:29 -0500 Subject: Rewrite .. again --- early-init.el | 70 +++++++++++++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 38 deletions(-) (limited to 'early-init.el') 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 @@ ;;; early-init.el ~ acdw -;;; different platforms -(setq my/is-windows-p (eq system-type 'windows-nt) - my/is-linux-p (eq system-type 'gnu/linux) - ;; TODO my/is-larry-p, my/is-bax-p (hostname) - ) +;;; this needs to happen first -- speed up init +(setq gc-cons-threshold most-positive-fixnum) +(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)) -(when my/is-windows-p - (setenv "PATH" (concat "path/to/git" ";" (getenv "PATH")))) +(add-hook 'after-init-hook + (lambda () + (setq file-name-handler-alist file-name-handler-alist-old) + (setq gc-cons-threshold (* 32 1024 1024))) + t) +;;(setq debug-on-error t) -;;; gui -(push '(tool-bar-lines . 0) default-frame-alist) -(push '(menu-bar-lines . 0) default-frame-alist) +;;; different platforms +(setq acdw/at-work (eq system-type 'windows-nt)) +(setq acdw/at-larry (string= (system-name) "larry")) +(setq acdw/at-bax (string= (system-name) "bax")) + +;; this needs to be before bootstrapping straight.el +(when acdw/at-work + (add-to-list 'exec-path "~/bin") + (add-to-list 'exec-path "C:/Users/aduckworth/Downloads/PortableGit/bin")) -(unless (display-graphic-p) - (tool-bar-mode -1) - (menu-bar-mode -1)) -(scroll-bar-mode -1) -(fringe-mode '(7 . 1)) +;;; gui +(add-to-list 'default-frame-alist '(tool-bar-lines . 0)) +(add-to-list 'default-frame-alist '(menu-bar-lines . 0)) (setq inhibit-startup-buffer-menu t) (setq inhibit-startup-screen t) -(setq inhibit-startup-echo-area-message "acdw") (setq initial-buffer-choice t) (setq initial-scratch-message nil) ;;; straight.el ~ github.com/raxod502/straight.el -;; use use-package -(setq straight-use-package-by-default t) +(setq straight-use-package-by-default t) ; use use-package +(setq use-package-hook-name-suffix nil) ; don't assume -hook -;; boostrap straight.el +;; bootstrap (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)) ;; install use-package with straight (straight-use-package 'use-package) - -;;; other init stuff - -(setq gc-cons-threshold (* 256 1024 1024)) -(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)) - -;; post-init -(add-hook 'after-init-hook - (lambda () - (setq file-name-handler-alist file-name-handler-alist-old) - (setq gc-cons-threshold (* 32 1024 1024))) - t) -- cgit 1.4.1-21-gabe81