branch: externals/modus-themes commit d8d36c40e17bab3d1d6cd3c3009af6296a762b4e Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Refine how modus-themes-to-toggle gets the list of themes in its :type --- modus-themes.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modus-themes.el b/modus-themes.el index d5270aa061..1aa30d2d1a 100644 --- a/modus-themes.el +++ b/modus-themes.el @@ -309,11 +309,12 @@ If the value is nil or otherwise does not specify two valid Modus themes, the command `modus-themes-toggle' reverts to selecting a theme from the list of available Modus themes. In effect, it is the same as using the command `modus-themes-select'." - :type `(choice - (const :tag "No toggle" nil) - (list :tag "Pick two themes to toggle between" - (choice :tag "Theme one of two" ,@(mapcar (lambda (theme) (list 'const theme)) modus-themes-items)) - (choice :tag "Theme two of two" ,@(mapcar (lambda (theme) (list 'const theme)) modus-themes-items)))) + :type (let ((themes (mapcar (lambda (theme) (list 'const theme)) modus-themes-items))) + `(choice + (const :tag "No toggle" nil) + (list :tag "Pick two themes to toggle between" + (choice :tag "Theme one of two" ,@themes) + (choice :tag "Theme two of two" ,@themes)))) :package-version '(modus-themes . "4.0.0") :version "30.1" :group 'modus-themes)