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

    Make the modus-themes-rotate-subr start from 0 if no other position is 
available
    
    We still want to perform a rotation when the current theme is not on
    the modus-themes-to-rotate. This is done in response to issue 60 on
    the ef-themes repository (but applies to use here too, more so since I
    am redesigning the ef-themes to be derived from the modus-themes):
    <https://github.com/protesilaos/ef-themes/issues/60>.
---
 modus-themes.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modus-themes.el b/modus-themes.el
index 4f6fdf3906..ebb7b661e8 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -4871,7 +4871,7 @@ Disable other themes per 
`modus-themes-disable-other-themes'."
 The theme is the next among THEMES if it is possible to rotate to it.
 When REVERSE is non-nil, move to the left, else to the right."
   (let ((valid-themes (modus-themes-known-p themes)))
-    (if-let* ((index (seq-position valid-themes 
(modus-themes-get-current-theme)))
+    (if-let* ((index (or (seq-position valid-themes 
(modus-themes-get-current-theme)) 0))
               (offset (mod (if reverse (1- index) (1+ index))
                            (length valid-themes)))
               (new-theme (nth offset valid-themes)))

Reply via email to