Move org custom faces to a use-package :custom-face block.

This prevent the faces from being written to custom.el.
This commit is contained in:
Tom Alexander 2026-02-14 21:54:01 -05:00
parent bf006a968b
commit 3df022ab3f
Signed by: talexander
GPG Key ID: 36C99E8B3C39D85F
3 changed files with 88 additions and 80 deletions

View File

@ -1,9 +1,19 @@
(package-initialize) (package-initialize)
(use-package use-package) (use-package use-package
:custom
;; Unless otherwise specified, always install packages if they are absent.
(use-package-always-ensure t)
;; Allow updating built-in packages like eglot
;; For some reason, built-in packages are still not updating so I'm just going to comment this out.
;; (package-install-upgrade-built-in t)
;; Natively compile packages
(package-native-compile t)
:config
(add-to-list 'package-archives (add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") '("melpa" . "https://melpa.org/packages/")
) )
)
(use-package auto-package-update (use-package auto-package-update
:ensure t :ensure t
@ -71,10 +81,11 @@
) )
(setq-default (setq-default
;; Unless otherwise specified, always install packages if they are absent.
use-package-always-ensure t
;; Point custom-file at /dev/null so emacs does not write any settings to my dotfiles. ;; Point custom-file at /dev/null so emacs does not write any settings to my dotfiles.
custom-file "/dev/null" ;; custom-file "/dev/null"
;;
;; list-package breaks on newer versions of emacs if custom-file is set to /dev/null
custom-file (expand-file-name "custom.el" user-emacs-directory)
;; Don't pop up a small window at the bottom of emacs at launch. ;; Don't pop up a small window at the bottom of emacs at launch.
inhibit-startup-screen t inhibit-startup-screen t
inhibit-startup-message t inhibit-startup-message t
@ -95,8 +106,6 @@
"%b"))) "%b")))
;; Use 'y' or 'n' instead of 'yes' or 'no' ;; Use 'y' or 'n' instead of 'yes' or 'no'
use-short-answers t use-short-answers t
;; Natively compile packages
package-native-compile t
;; Confirm when opening a file that does not exist ;; Confirm when opening a file that does not exist
confirm-nonexistent-file-or-buffer t confirm-nonexistent-file-or-buffer t
;; Do not require double space to end a sentence. ;; Do not require double space to end a sentence.

View File

@ -1,4 +1,5 @@
(use-package eglot (use-package eglot
;; This is an emacs built-in but we're pulling the latest version
:pin gnu :pin gnu
:commands (eglot eglot-ensure) :commands (eglot eglot-ensure)
:bind (:map eglot-mode-map :bind (:map eglot-mode-map

View File

@ -1,3 +1,5 @@
(require 'color)
(let ((bg (face-attribute 'default :background)))
(use-package org (use-package org
:ensure nil :ensure nil
:commands org-mode :commands org-mode
@ -19,6 +21,10 @@
(org-shiftdown-final . windmove-down) (org-shiftdown-final . windmove-down)
(org-shiftright-final . windmove-right) (org-shiftright-final . windmove-right)
) )
:custom-face
(org-block ((t (:inherit default :background ,(color-lighten-name bg 15) :extend ,t))))
(org-block-begin-line ((t (:inherit default :background ,"#472300" :extend ,t))))
(org-block-end-line ((t (:inherit default :background ,"#472300" :extend ,t))))
:config :config
(require 'org-tempo) (require 'org-tempo)
(setq org-export-latex-listings t) (setq org-export-latex-listings t)
@ -67,15 +73,7 @@
(gnuplot . t) (gnuplot . t)
(sqlite . t) (sqlite . t)
)) ))
)
(require 'color)
(let ((bg (face-attribute 'default :background)))
(custom-set-faces
`(org-block ((t (:inherit default :background ,(color-lighten-name bg 15) :extend ,t))))
`(org-block-begin-line ((t (:inherit default :background ,"#472300" :extend ,t))))
`(org-block-end-line ((t (:inherit default :background ,"#472300" :extend ,t))))
))
) )
(use-package org-bullets (use-package org-bullets