branch: externals/modus-themes
commit bdd3470622c25b408edc59b677c2dc431bfe78b0
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Make modus-themes-load-theme accept an optional hook argument
---
 modus-themes.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modus-themes.el b/modus-themes.el
index 981445b859..89a63b3059 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -4739,19 +4739,19 @@ If OVERRIDES-ONLY is non-nil, return just the 
overrides."
        custom-enabled-themes
      (modus-themes-get-all-known-themes))))
 
-(defun modus-themes-load-theme (theme)
+(defun modus-themes-load-theme (theme &optional hook)
   "Load THEME while disabling other themes.
 
 Which themes are disabled is determined by the user option
 `modus-themes-disable-other-themes'.
 
 Run the `modus-themes-after-load-theme-hook' as the final step
-after loading the THEME.
+after loading the THEME.  If HOOK, then call that instead.
 
 Return THEME."
   (modus-themes--disable-themes)
   (load-theme theme :no-confirm)
-  (run-hooks 'modus-themes-after-load-theme-hook)
+  (run-hooks (or hook 'modus-themes-after-load-theme-hook))
   theme)
 
 (defun modus-themes--retrieve-palette-value (color palette)

Reply via email to