branch: externals/doric-themes commit 3bbeb8f1161b5a298b10c8bd7f5acd82a8bc5077 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make subset prompt use read-multiple-choice This is how I do it for my other themes as well. It is the better approach when there are only two options. --- doric-themes.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/doric-themes.el b/doric-themes.el index a10452af65..06b3bd61fa 100644 --- a/doric-themes.el +++ b/doric-themes.el @@ -259,18 +259,17 @@ respectively." (delete current-theme themes) themes))) -(defvar doric-themes-subset-history nil - "Minibuffer history for `doric-themes-subset-prompt'.") +(make-obsolete-variable 'doric-themes-subset-history nil "0.2.0") (defun doric-themes-subset-prompt () "Select `dark' or `light' and return it as a symbol." - (let ((default (car doric-themes-subset-history))) - (intern - (completing-read - (format-prompt "Select variant" default) - '("dark" "light") - nil :require-match nil - doric-themes-subset-history default)))) + (intern + (cadr + (read-multiple-choice + "Variant" + '((?d "dark" "Load a random dark theme") + (?l "light" "Load a random light theme")) + "Limit to the dark or light subset of the Ef themes collection.")))) ;;;###autoload (defun doric-themes-load-random (&optional variant)