From d9063ef9d606c0adca90c9c568fa67b5355dcdf4 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 25 Sep 2021 13:16:09 -0500 Subject: Clean up early-init.el and whitespace --- early-init.el | 76 +++++++++++++++++++++++------------------------------------ init.el | 8 +++---- 2 files changed, 33 insertions(+), 51 deletions(-) diff --git a/early-init.el b/early-init.el index 9e410b1..bb6454e 100644 --- a/early-init.el +++ b/early-init.el @@ -26,24 +26,22 @@ (require 'acdw-frame) ;;; Frame settings -(setq default-frame-alist ; Remove most UI - `((tool-bar-lines . 0) ; No tool bar - (menu-bar-lines . 0) ; No menu bar - (vertical-scroll-bars) ; No scroll bars - (horizontal-scroll-bars) ; ... at all - (width . 84) ; A /little/ wider than - ; `fill-column' (set later) +(setq default-frame-alist + `((tool-bar-lines . 0) + (menu-bar-lines . 0) + (vertical-scroll-bars . nil) + (horizontal-scroll-bars . nil) + (width . 84) (height . 30) - (left-fringe . 8) ; Width of fringes - (right-fringe . 8) ; (8 is default) + (left-fringe . 8) + (right-fringe . 8) (font . ,(acdw/system (:home "DejaVu Sans Mono 10") (:work "Consolas 12") (:other "monospace 10")))) - frame-inhibit-implied-resize t ; Don't resize randomly - frame-resize-pixelwise t ; Resize by pixels, not chars - inhibit-x-resources t ; Don't load ~/.Xresources - ) + frame-inhibit-implied-resize t + frame-resize-pixelwise t + inhibit-x-resources t) (add-hook 'after-init-hook (defun after-init@disable-ui-modes () @@ -64,26 +62,23 @@ say, `tool-bar-mode' once to toggle the tool bar back on." (add-hook 'after-make-frame-functions (defun after-make-frame@setup (&rest args) (ignore args) - (let ((monospace-faces - ;; (acdw/system - ;; (:work '((:font "Consolas" :height 110) - ;; (:font "DejaVu Sans Mono" :height 110) - ;; (:font "monospace" :height 110))) - ;; (_ '((:font "DejaVu Sans Mono" :height 100) - ;; (:font "Consolas" :height 100) - ;; (:font "monospace" :height 100)))) + (let ((fixed-pitch-faces '((:font "Fantasque Sans Mono" :height 110) (:font "Go Mono" :height 100) (:font "DejaVu Sans Mono" :height 110) - (:font "monospace" :height 100)))) - (acdw/set-first-face-attribute 'default monospace-faces) - (acdw/set-first-face-attribute 'fixed-pitch monospace-faces) + (:font "monospace" :height 100))) + (variable-pitch-faces + '((:font "Comic Neue" :height 125) + (:font "Inter" :height 120) + (:font "Go" :height 120) + (:font "sans-serif" + :height 100)))) + (acdw/set-first-face-attribute 'default + fixed-pitch-faces) + (acdw/set-first-face-attribute 'fixed-pitch + fixed-pitch-faces) (acdw/set-first-face-attribute 'variable-pitch - '((:font "Comic Neue" :height 125) - (:font "Inter" :height 120) - (:font "Go" :height 120) - (:font "sans-serif" - :height 100)))) + variable-pitch-faces)) (acdw/set-emoji-fonts "Noto Color Emoji" "Noto Emoji" "Segoe UI Emoji" @@ -125,22 +120,7 @@ say, `tool-bar-mode' once to toggle the tool bar back on." ;;; Bootstrap package manager (`straight.el') -;; 1. Update `exec-path'. -(dolist (path (list (expand-file-name "bin" user-emacs-directory) - (expand-file-name "~/bin") - (expand-file-name "~/.local/bin") - (expand-file-name "~/usr/bin") - (expand-file-name "~/cmd") - (expand-file-name "~/mingw64/bin") - (expand-file-name "~/clisp-2.49")) - exec-path) - (when (file-exists-p path) - (add-to-list 'exec-path path :append))) - -;; 1.5. Update $PATH to reflect changes. -(setenv "PATH" (mapconcat #'identity exec-path path-separator)) - -;; 2. Set `package' and `straight' variables. +;; Set `package' and `straight' variables. (setq package-enable-at-startup nil package-quickstart nil straight-host-usernames '((github . "duckwork") @@ -148,7 +128,7 @@ say, `tool-bar-mode' once to toggle the tool bar back on." straight-base-dir (acdw/dir) straight-check-for-modifications '(check-on-save find-when-checking)) -;; 3. Bootstrap `straight'. +;; Bootstrap `straight'. (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name @@ -189,7 +169,9 @@ say, `tool-bar-mode' once to toggle the tool bar back on." ;; These packages are here because they need to be loaded /before/ ;; everything else in init.el. -(straight-use-package '(setup :host nil :repo "https://git.sr.ht/~pkal/setup")) +(straight-use-package '(setup + :host nil + :repo "https://git.sr.ht/~pkal/setup")) (require 'setup) (require 'acdw-setup) diff --git a/init.el b/init.el index d19d715..6d1eb92 100644 --- a/init.el +++ b/init.el @@ -1243,8 +1243,8 @@ specific to most general, they are these: (crux-reopen-as-root-mode +1)) (setup (:straight-if (define-repeat-map - :host nil - :repo "https://tildegit.org/acdw/define-repeat-map.el") + :host nil + :repo "https://tildegit.org/acdw/define-repeat-map.el") (acdw/system :home)) (defun acdw/other-window-or-switch-buffer-backward () @@ -1883,8 +1883,8 @@ the default is \"/\"." for n from 0 collect (el-patch-swap (org-add-props - head nil '`face - (nth (% n org-n-level-faces) org-level-faces)) + head nil '`face + (nth (% n org-n-level-faces) org-level-faces)) head)) separator)))) (when (> (length fpath) width) -- cgit 1.4.1-21-gabe81