| Paste number 39628: | need fn to randomly select a color-theme |
| Pasted by: | metaperl |
| When: | 4 years, 9 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+UKS |
| Channel: | #xemacs |
| Paste contents: |
I have a list of color-theme functions. Each of theme simply sets the color-theme for my XEmacs. I would like to have an interactive function which randomly selects a function from the list calls it.
(setq color-theme-favorites '(classic infodoc tty-dary))
;;; now somebody write the function to:
(defun color-theme-random ()
(interactive)
(let* ((choice (random color-theme-favorites))
(choice-str (symbol-2-string choice))
(fn-str (strcat "color-theme-" choice-str))
(fn (str-2-symbol))
(apply fn)))
This paste has no annotations.