summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2023-05-12 18:41:57 +0100
committerYann Herklotz <git@yannherklotz.com>2023-05-12 18:42:22 +0100
commit2bfd03941bacf2d693079e188e38021c070ee6f5 (patch)
treed2760e9a96b5de0d55f236e18e73df0ca24334c5
parente4ef883fba99bbc673ec8ccafdadb0f9096a2229 (diff)
downloadymh-emacs-2bfd03941bacf2d693079e188e38021c070ee6f5.tar.gz
ymh-emacs-2bfd03941bacf2d693079e188e38021c070ee6f5.zip
Call customisation function everytime the theme is changed
-rw-r--r--init.el11
-rw-r--r--ymh-emacs/ymh-common.el3
2 files changed, 8 insertions, 6 deletions
diff --git a/init.el b/init.el
index 615cc8b..98c4b9d 100644
--- a/init.el
+++ b/init.el
@@ -461,9 +461,7 @@ https://yannherklotz.com"))
'(modus-operandi-tinted modus-vivendi-tinted))
(modus-themes-italic-constructs t)
:config
- (add-hook
- 'modus-themes-after-load-theme-hook
- (lambda ()
+ (defun ymh-modus-theme-apply-customisations ()
(modus-themes-with-colors
(custom-set-faces
`(proof-locked-face ((,c :background ,bg-green-nuanced :extend t)))
@@ -474,8 +472,11 @@ https://yannherklotz.com"))
:box (:line-width -1 :color ,bg-red-intense
:style nil))))
`(fill-column-indicator ((,c :background unspecified
- :height unspecified)))))))
- (modus-themes-load-theme 'modus-operandi-tinted))
+ :height unspecified))))))
+ (add-hook
+ 'modus-themes-after-load-theme-hook #'ymh-modus-theme-apply-customisations)
+ (modus-themes-load-theme 'modus-operandi-tinted)
+ (ymh-modus-theme-apply-customisations))
(use-package pass
:ensure t
diff --git a/ymh-emacs/ymh-common.el b/ymh-emacs/ymh-common.el
index c372764..bd7a943 100644
--- a/ymh-emacs/ymh-common.el
+++ b/ymh-emacs/ymh-common.el
@@ -47,7 +47,8 @@
('dark (load-theme 'modus-vivendi-tinted t))
;;('light (load-theme 'ef-spring t))
;;('dark (load-theme 'ef-dark t))
- ))
+ )
+ (ymh-modus-theme-apply-customisations))
(defadvice load-theme
(before theme-dont-propagate activate)