diff options
author | Case Duckworth | 2024-06-10 23:11:15 -0500 |
---|---|---|
committer | Case Duckworth | 2024-06-10 23:11:15 -0500 |
commit | 75137467d90494170a2c0cd34489954196b6416a (patch) | |
tree | a8aae9a7d72133ff7e4b778eb695ee503280fbd0 /emacs.d | |
parent | Update theme (diff) | |
download | dots-75137467d90494170a2c0cd34489954196b6416a.tar.gz dots-75137467d90494170a2c0cd34489954196b6416a.zip |
Update init
Diffstat (limited to 'emacs.d')
-rw-r--r-- | emacs.d/early-init.el | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/emacs.d/early-init.el b/emacs.d/early-init.el index 2a4f2b5..7374bd1 100644 --- a/emacs.d/early-init.el +++ b/emacs.d/early-init.el | |||
@@ -1,4 +1,4 @@ | |||
1 | ;;; ~/.emacs.d/early-init.el -*- lexical-binding: t -*- | 1 | ;;; ~/.emacs.d/early-init.el -*- lexical-binding: t; -*- |
2 | ;; Author: Case Duckworth <acdw@acdw.net> | 2 | ;; Author: Case Duckworth <acdw@acdw.net> |
3 | 3 | ||
4 | (setopt frame-inhibit-implied-resize t) | 4 | (setopt frame-inhibit-implied-resize t) |
@@ -12,18 +12,19 @@ | |||
12 | 12 | ||
13 | (defvar *fonts* | 13 | (defvar *fonts* |
14 | '((default | 14 | '((default |
15 | :family ("Recursive Mono Casual Static" "DejaVu Sans Mono") | 15 | :family ;;("Recursive Mono Casual Static" "DejaVu Sans Mono") |
16 | ("Public Sans" "DejaVu Sans") | ||
16 | :height 100) | 17 | :height 100) |
17 | (variable-pitch | 18 | (variable-pitch |
18 | :family ("Public Sans" "DejaVu Sans") | 19 | :family ("Public Sans" "DejaVu Sans") |
19 | :height 1.0) | 20 | :height 1.0) |
20 | (fixed-pitch | 21 | (fixed-pitch |
21 | :family ("Recursive Mono Linear Static" "DejaVu Sans Mono")) | 22 | :family ("Recursive Mono Casual Static" "DejaVu Sans Mono")) |
22 | (fixed-pitch-serif | 23 | (fixed-pitch-serif |
23 | :family ("Recursive Mono Linear Static" "DejaVu Sans Mono")))) | 24 | :family ("Recursive Mono Linear Static" "DejaVu Sans Mono")))) |
24 | 25 | ||
25 | (require 'package) | 26 | (require 'package) |
26 | (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | 27 | (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) |
27 | (package-initialize) | 28 | (package-initialize) |
28 | 29 | ||
29 | ;;; Custom functions | 30 | ;;; Custom functions |
@@ -81,7 +82,7 @@ If already so, run FUNC immediately." | |||
81 | :height (or (plist-get spec :height) | 82 | :height (or (plist-get spec :height) |
82 | 'unspecified))) | 83 | 'unspecified))) |
83 | ;; Specialized fonts | 84 | ;; Specialized fonts |
84 | (cl-loop with ffl = (font-family-alist) | 85 | (cl-loop with ffl = (font-family-list) |
85 | for (charset . font) | 86 | for (charset . font) |
86 | in '((latin . "Noto Sans") | 87 | in '((latin . "Noto Sans") |
87 | (han . "Noto Sans CJK SC Regular") | 88 | (han . "Noto Sans CJK SC Regular") |
@@ -183,7 +184,7 @@ Whether it tabifies or untabifies depends on `space-indent-modes'." | |||
183 | (defun package-ensure (pkg) | 184 | (defun package-ensure (pkg) |
184 | "Install PKG if it's not already installed." | 185 | "Install PKG if it's not already installed." |
185 | (unless (package-installed-p pkg) | 186 | (unless (package-installed-p pkg) |
186 | (package-install pkg))) | 187 | (package-vc-install pkg))) |
187 | 188 | ||
188 | (defun minibuffer-delete-directory () | 189 | (defun minibuffer-delete-directory () |
189 | "Delete the last directory in a file-completing minibuffer." | 190 | "Delete the last directory in a file-completing minibuffer." |
@@ -196,3 +197,20 @@ Whether it tabifies or untabifies depends on `space-indent-modes'." | |||
196 | (when (search-backward "/" (minibuffer-prompt-end) t) | 197 | (when (search-backward "/" (minibuffer-prompt-end) t) |
197 | (delete-region (point) here)) | 198 | (delete-region (point) here)) |
198 | (backward-kill-word 1)))) | 199 | (backward-kill-word 1)))) |
200 | |||
201 | (defun save-buffers-kill* (arg) | ||
202 | "Save all the buffers and kill ... something. | ||
203 | If ARG is 1 (called normally), kill the current terminal. | ||
204 | If ARG is 4 (with C-u), kill emacs but ask if there are processes running. | ||
205 | If ARG is 16, kill emacs without asking about processes." | ||
206 | (interactive "p") | ||
207 | (pcase arg | ||
208 | (1 (save-buffers-kill-terminal)) | ||
209 | (4 (save-buffers-kill-emacs t)) | ||
210 | (16 (let ((confirm-kill-processes nil) | ||
211 | (kill-emacs-query-functions nil) | ||
212 | (confirm-kill-emacs nil)) | ||
213 | (save-buffers-kill-emacs t))))) | ||
214 | |||
215 | (defun regexp-concat (&rest regexps) | ||
216 | (string-join regexps "\\|")) | ||