So here is what I am going to do. I keep require-theme as the basic theme enabling mechanism and do _not_ replace it by unconditional loading. I implement the solutions specified below to my three problems. I will install soon. Then people can try it out and see whether the entire stuff, including interactive use, works well enough for documentation in the Emacs manual.
VAR has standard value 0, Theme1 sets it to 1, Theme2 to 2. Example 1: Require Theme1. VAR is 1. Good. Unload Theme1. Var is 0. Perfect. Require Theme1 again. No effect, because Theme1 is still provided. This problem could be fixed by adding: (setq custom-loaded-themes (delq theme custom-loaded-themes)) (setq features (delq (get theme 'theme-feature) features))) to the end of `custom-do-theme-reset', I will do exactly that. Example 2: Require Theme1. VAR is 1. Good. Require Theme2. VAR is 2. Good. Require Theme1 again. No effect, because Theme1 is already provided. I would expect to be able to use this to reset VAR to 1. Basically, this type of use does require replacing requiring by loading as the basic interactive theme enabling mechanism. I will tell people in the docs that they need to manually load the file containing Theme1 if they are in this situation and that is what they want. If people turn out to be often in this situation, we could provide a third interactive command to make this more convenient. Example 3: Require Theme1. VAR is 1. Require Theme2. VAR is 2. Unload Theme2. VAR is 0. After reading the docstring more carefully, this appears to be intentional, so I am going to leave it unchanged. Manually reloading the file containing Theme1 will be the recommended solution for people who actually wanted the "setting VAR to 1" type behavior. Sincerely, Luc. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel