diff options
author | Grant Shangreaux <grant@unabridgedsoftware.com> | 2022-07-17 16:03:11 -0500 |
---|---|---|
committer | Grant Shangreaux <grant@unabridgedsoftware.com> | 2022-07-17 16:03:11 -0500 |
commit | 401ee7104fdef1dc6e9b588201d9a70570f0f873 (patch) | |
tree | f3ebab918214716434b24e0d01823e28eff16ee1 | |
parent | c570284ace0ed5f1f254f9cc475a30f4be56af0f (diff) |
Fix: defvars at the top of the tangle with noweb-ref
-rw-r--r-- | moo.org | 18 | ||||
-rw-r--r-- | shoshin-config.el | 21 | ||||
-rw-r--r-- | shoshin-config.org | 17 |
3 files changed, 43 insertions, 13 deletions
@@ -96,3 +96,21 @@ overriding the variable in this subtree #+RESULTS: : baz + +* Loo + +#+begin_src emacs-lisp :noweb-ref defvars + (defvar loo) +#+end_src + +* Boo + +#+begin_src emacs-lisp :noweb-ref defvars + (defvar boo) +#+end_src + +* Mama + +#+begin_src emacs-lisp :noweb yes + <<defvars>> +#+end_src diff --git a/shoshin-config.el b/shoshin-config.el index 7834edd..0d6b729 100644 --- a/shoshin-config.el +++ b/shoshin-config.el @@ -7,6 +7,15 @@ (setq custom-file my-custom-file) (load custom-file)) +(defvar my-themes-to-install + '(cyberpunk-theme dracula-theme nano-theme) + "List of themes to install when loading shoshimacs config.") + +(defvar my-chosen-themes + '(cyberpunk dichromacy dracula leuven modus-operandi modus-vivendi + nano-dark nano-light tango tango-dark) + "List of themes I prefer for narrowing and random selection.") + ;;; Package Management (when (< emacs-major-version 28) (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/"))) @@ -59,7 +68,7 @@ 1 delete-other-windows a apropos b consult-buffer - c my-config + c my-configuration d embark-act e eshell f find-file @@ -169,15 +178,9 @@ (global-hl-line-mode t) -(defvar my-themes-to-install - '(cyberpunk-theme dracula-theme nano-theme) - "List of themes to install when loading shoshimacs config.") -(mapc #'package-install my-themes-to-install) +(load-theme (seq-random-elt my-chosen-themes)) -(defvar my-chosen-themes - '(cyberpunk dichromacy dracula leuven modus-operandi modus-vivendi - nano-dark nano-light tango tango-dark) - "List of themes I prefer for narrowing and random selection.") +(mapc #'package-install my-themes-to-install) (load-theme (seq-random-elt my-chosen-themes)) (package-install 'windresize) diff --git a/shoshin-config.org b/shoshin-config.org index 9c05ae3..c0f143e 100644 --- a/shoshin-config.org +++ b/shoshin-config.org @@ -36,6 +36,8 @@ is tangled into the resulting elisp file: <<preamble>> + <<defvars>> + ;;; Package Management <<package-management>> @@ -253,7 +255,7 @@ to go away. 1 delete-other-windows a apropos b consult-buffer - c my-config + c my-configuration d embark-act e eshell f find-file @@ -769,11 +771,14 @@ to keep it concise, i'll define a special variable to hold the theme packages i'd like to install anytime this config is loaded on a system where they are not there. then i can ~mapc~ #'package-install over the list of themes. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :noweb-ref defvars (defvar my-themes-to-install '(cyberpunk-theme dracula-theme nano-theme) "List of themes to install when loading shoshimacs config.") - (mapc #'package-install my-themes-to-install) +#+end_src + +#+begin_src emacs-lisp + (load-theme (seq-random-elt my-chosen-themes)) #+end_src *** chosen theme list and random loading on init @@ -783,11 +788,15 @@ and the ones i specifically install i'd like to keep in a list of "chosen" ones. i can load one at random if i please, and perhaps provide it as candidates to ~consult-themes~. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :noweb-ref defvars (defvar my-chosen-themes '(cyberpunk dichromacy dracula leuven modus-operandi modus-vivendi nano-dark nano-light tango tango-dark) "List of themes I prefer for narrowing and random selection.") +#+end_src + +#+begin_src emacs-lisp + (mapc #'package-install my-themes-to-install) (load-theme (seq-random-elt my-chosen-themes)) #+end_src |