emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/standard-themes da29018fe1 12/74: Provide commands to l


From: ELPA Syncer
Subject: [elpa] externals/standard-themes da29018fe1 12/74: Provide commands to load either of the themes
Date: Wed, 30 Nov 2022 08:58:22 -0500 (EST)

branch: externals/standard-themes
commit da29018fe1f8bee4bb2bf1cd1f2ad615157fbdc5
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Provide commands to load either of the themes
---
 standard-themes.el | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/standard-themes.el b/standard-themes.el
index c86e0a0dcf..c77454fb5c 100644
--- a/standard-themes.el
+++ b/standard-themes.el
@@ -578,6 +578,18 @@ Run `standard-themes-post-load-hook'."
   (load-theme theme :no-confirm)
   (run-hooks 'standard-themes-post-load-hook))
 
+;;;###autoload
+(defun standard-themes-load-dark ()
+  "Load `standard-dark' and run `standard-themes-post-load-hook'."
+  (interactive)
+  (standard-themes--load-theme 'standard-dark))
+
+;;;###autoload
+(defun standard-themes-load-light ()
+  "Load `standard-light' and run `standard-themes-post-load-hook'."
+  (interactive)
+  (standard-themes--load-theme 'standard-light))
+
 (defun standard-themes--load-prompt ()
   "Helper for `standard-themes-toggle'."
   (let ((theme
@@ -586,8 +598,8 @@ Run `standard-themes-post-load-hook'."
                            standard-themes-items nil t))))
     (mapc #'disable-theme (standard-themes--list-known-themes))
     (pcase theme
-      ('standard-light (standard-themes--load-theme 'standard-light))
-      ('standard-dark (standard-themes--load-theme 'standard-dark)))))
+      ('standard-light (standard-themes-load-light))
+      ('standard-dark (standard-themes-load-dark)))))
 
 ;;;###autoload
 (defun standard-themes-toggle ()
@@ -595,8 +607,8 @@ Run `standard-themes-post-load-hook'."
 Run `standard-themes-post-load-hook' after loading the theme."
   (interactive)
   (pcase (standard-themes--current-theme)
-    ('standard-light (standard-themes--load-theme 'standard-dark))
-    ('standard-dark (standard-themes--load-theme 'standard-light))
+    ('standard-light (standard-themes-load-dark))
+    ('standard-dark (standard-themes-load-light))
     (_ (standard-themes--load-prompt))))
 
 (defun standard-themes--preview-colors-render (buffer theme &rest _)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]