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

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

[elpa] externals/ef-themes 4555374a96: Make ef-themes-load-random report


From: ELPA Syncer
Subject: [elpa] externals/ef-themes 4555374a96: Make ef-themes-load-random report name of loaded theme
Date: Thu, 27 Oct 2022 12:57:43 -0400 (EDT)

branch: externals/ef-themes
commit 4555374a965175094b6d1ed770f53d713550afe7
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Make ef-themes-load-random report name of loaded theme
    
    Thanks to Federico Stilman for sharing with me the idea of reporting
    the name of the randomly loaded theme.  This information is shared
    with permission, as it was done via a private channel.
---
 README.org   | 5 +++--
 ef-themes.el | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/README.org b/README.org
index f1c4aee603..65f3972895 100644
--- a/README.org
+++ b/README.org
@@ -1252,8 +1252,9 @@ matters.
   Philip Kaludercic.
 
 + Ideas and/or user feedback :: Alan Schmitt, Anthony Chavez, Daniel
-  Mendler, Iris Garcia, Jean-Philippe Gagné Guay, Jonas Collberg,
-  Spike-Leung, Steve Molitor, Summer Emacs, Sven Seebeck, Zoltán Király.
+  Mendler, Federico Stilman, Iris Garcia, Jean-Philippe Gagné Guay,
+  Jonas Collberg, Spike-Leung, Steve Molitor, Summer Emacs, Sven
+  Seebeck, Zoltán Király.
 
 * GNU Free Documentation License
 :PROPERTIES:
diff --git a/ef-themes.el b/ef-themes.el
index 3bf9d231ce..67414949b8 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -456,10 +456,10 @@ symbol."
   (interactive (list (when current-prefix-arg (ef-themes--choose-subset))))
   (let* ((themes (ef-themes--minus-current variant))
          (n (random (length themes)))
-         (pick (nth n themes)))
-    (if (null pick)
-        (ef-themes--load-theme (car themes))
-      (ef-themes--load-theme pick))))
+         (pick (nth n themes))
+         (loaded (if (null pick) (car themes) pick)))
+    (ef-themes--load-theme loaded)
+    (message "Loaded `%s'" loaded)))
 
 (defun ef-themes--preview-colors-render (buffer theme &rest _)
   "Render colors in BUFFER from THEME.



reply via email to

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