Skip to content

Commit f6e826c

Browse files
committed
revert: don't apply the early background-color hack
This reverts commit d37e4e2.
1 parent 7847a6f commit f6e826c

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

core/me-builtin.el

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,6 @@
166166
"Disable previously enabled themes before enabling the new one."
167167
(mapc #'disable-theme custom-enabled-themes)))
168168

169-
(advice-add
170-
'load-theme :after
171-
(satch-defun +theme--save-current-theme-background-color:after-a (&rest _)
172-
"Save the background color."
173-
(with-temp-buffer
174-
(insert (face-background 'default))
175-
(let ((buffer-file-name (concat minemacs-cache-dir "background-color")))
176-
(+shutup! (basic-save-buffer-1))))))
177-
178169
;; Show trailing whitespace in `prog-mode' and `conf-mode'
179170
(+setq-hook! (prog-mode conf-mode) show-trailing-whitespace t)
180171

early-init.el

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@
3131
menu-bar-mode nil
3232
scroll-bar-mode nil)
3333

34-
;; In `me-builtin', we advice `load-theme' to save the background color of the
35-
;; current theme to a file. If that file exists, we load the color and apply it
36-
;; early to avoid flickering at startup.
37-
(let* ((bg-color (concat (file-name-directory load-file-name) "local/cache/background-color"))
38-
(bg-color (and (file-exists-p bg-color) (with-temp-buffer (insert-file-contents bg-color) (buffer-string)))))
39-
;; Extra checks to ensure we have a valid color value, like #0123fe3
40-
(when (and bg-color (length= bg-color 7) (string-equal (substring bg-color 0 1) "#"))
41-
(push `(background-color . ,bg-color) default-frame-alist)))
42-
4334
;; NOTE: In Emacs29+, frames can have a transparent background via the
4435
;; `alpha-background' parameter. For a better experience, this value should be
4536
;; set early before any frame gets created (i.e. in "early-init.el"). MinEmacs

0 commit comments

Comments
 (0)