From 2dee61f2f10485da65c31f2a6c9d6c7f6ac736f3 Mon Sep 17 00:00:00 2001
From: Thomas Voss <mail@thomasvoss.com>
Date: Thu, 17 Aug 2023 08:23:21 +0200
Subject: emacs: Remove ‘mango-after-load-theme-hook’
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .config/emacs/config.org     | 26 +-------------------------
 .config/emacs/mango-theme.el |  6 +++++-
 2 files changed, 6 insertions(+), 26 deletions(-)

(limited to '.config/emacs')

diff --git a/.config/emacs/config.org b/.config/emacs/config.org
index 7dfde90..196754f 100644
--- a/.config/emacs/config.org
+++ b/.config/emacs/config.org
@@ -476,13 +476,7 @@ that’s what the ~mango-minibuffer-backward-kill~ is for.
     :custom
     (vertico-cycle t)
     :init
-    (vertico-mode)
-    (add-hook
-     'mango-after-load-theme-hook
-     (λ (face-spec-set
-         'vertico-current
-         `((t (:background
-               ,(face-attribute 'hl-line :background nil t))))))))
+    (vertico-mode))
 
 #+END_SRC
 
@@ -913,24 +907,6 @@ custom theme.  I do like to keep the older theme around though as a reference.
 
 #+END_SRC
 
-There is one issue though.  I like to have ~vertico~ use the same color when
-highlighting my current selection as I use to highlight the current line, and
-that changes with each theme I use.  For this reason we need some advice around
-the ~load-theme~ function to fire a hook.
-
-#+BEGIN_SRC elisp
-
-  (defvar mango-after-load-theme-hook nil
-    "Hook called after ‘load-theme’ is run.")
-
-  (defun mango--run-after-load-theme-hook (&rest unused)
-    "Run the hooks in ‘mango-after-load-theme-hook’ after we load a new theme."
-    (run-hooks 'mango-after-load-theme-hook))
-
-  (advice-add 'load-theme :after #'mango--run-after-load-theme-hook)
-
-#+END_SRC
-
 *** Fringes
 
 It’s also nice to have fringes!
diff --git a/.config/emacs/mango-theme.el b/.config/emacs/mango-theme.el
index 7e74d17..904776e 100644
--- a/.config/emacs/mango-theme.el
+++ b/.config/emacs/mango-theme.el
@@ -127,4 +127,8 @@ graphically, so I shouldn’t need to have multiple specs per face.
 
   ;; Info Page
   (Info-quoted
-   :inherit default))
+   :inherit default)
+
+  ;; Vertico
+  (vertico-current
+   :inherit hl-line))
-- 
cgit v1.2.3