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

    Add optional argument to silence message in ef-themes-rotate
---
 ef-themes.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/ef-themes.el b/ef-themes.el
index 344e9ffc85..74010fcf19 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -739,20 +739,24 @@ symbol."
     (error "Cannot determine a theme among `%s'" themes)))
 
 ;;;###autoload
-(defun ef-themes-rotate (themes)
+(defun ef-themes-rotate (themes &optional silent)
   "Rotate to the next theme among THEMES.
 When called interactively THEMES is the value of `ef-themes-to-rotate'.
 
 If the current theme is already the next in line, then move to the one
 after.  Perform the rotation rightwards, such that the first element in
-the list becomes the last.  Do not modify THEMES in the process."
+the list becomes the last.  Do not modify THEMES in the process.
+
+Print the name of the new theme, unless optional argument SILENT is
+non-nil."
   (interactive (list ef-themes-to-rotate))
   (unless (proper-list-p themes)
     "This is not a list of themes: `%s'" themes)
   (let ((candidate (ef-themes--rotate-p themes)))
     (if (ef-themes--ef-p candidate)
         (progn
-          (message "Rotating to `%s'" (propertize (symbol-name candidate) 
'face 'success))
+          (unless silent
+            (message "Rotating to `%s'" (propertize (symbol-name candidate) 
'face 'success)))
           (ef-themes-load-theme candidate))
       (user-error "`%s' is not part of the Ef collection" candidate))))
 

Reply via email to