branch: externals/ef-themes
commit 519972131e62d82afbf4d20c9d175ea94b8fc540
Author: Sean Devlin <s...@toadstyle.org>
Commit: Sean Devlin <s...@toadstyle.org>

    Add optional argument to silence message in ef-themes-load-random
---
 ef-themes.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ef-themes.el b/ef-themes.el
index 44a4382594..344e9ffc85 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -698,7 +698,7 @@ respectively.  Else check against the return value of
     (delete (ef-themes--current-theme) themes)))
 
 ;;;###autoload
-(defun ef-themes-load-random (&optional variant)
+(defun ef-themes-load-random (&optional variant silent)
   "Load an Ef theme at random, excluding the current one.
 
 With optional VARIANT as a prefix argument, prompt to limit the
@@ -706,6 +706,9 @@ set of themes to either dark or light variants.
 
 Run `ef-themes-post-load-hook' after loading the theme.
 
+Print the name of the new theme, unless optional argument SILENT is
+non-nil.
+
 When called from Lisp, VARIANT is either the `dark' or `light'
 symbol."
   (interactive (list (when current-prefix-arg (ef-themes--choose-subset))))
@@ -714,7 +717,8 @@ symbol."
          (pick (nth n themes))
          (loaded (if (null pick) (car themes) pick)))
     (ef-themes-load-theme loaded)
-    (message "Loaded `%s'" loaded)))
+    (unless silent
+      (message "Loaded `%s'" loaded))))
 
 ;;;; Rotate through a list of themes
 

Reply via email to