From 2bfd03941bacf2d693079e188e38021c070ee6f5 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 12 May 2023 18:41:57 +0100 Subject: Call customisation function everytime the theme is changed --- init.el | 11 ++++++----- ymh-emacs/ymh-common.el | 3 ++- 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) -- cgit