From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Custom themes Date: Tue, 28 Jun 2005 15:09:02 -0500 (CDT) Message-ID: <200506282009.j5SK92725000@raven.dms.auburn.edu> References: <200506250127.j5P1RWJ11778@raven.dms.auburn.edu> <200506250157.j5P1v5L11801@raven.dms.auburn.edu> <200506260319.j5Q3J5Q14922@raven.dms.auburn.edu> <200506281846.j5SIkVu24880@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119990017 4954 80.91.229.2 (28 Jun 2005 20:20:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2005 20:20:17 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 22:20:16 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DnMYq-0001zf-0P for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 22:20:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnMgk-0006pw-3C for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 16:28:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DnMed-00069p-25 for emacs-devel@gnu.org; Tue, 28 Jun 2005 16:25:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DnMeX-00067g-2Z for emacs-devel@gnu.org; Tue, 28 Jun 2005 16:25:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnMeW-0005zp-0n for emacs-devel@gnu.org; Tue, 28 Jun 2005 16:25:52 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DnMUR-0004D1-Jq; Tue, 28 Jun 2005 16:15:27 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j5SKAmCK022175; Tue, 28 Jun 2005 15:10:48 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j5SK92725000; Tue, 28 Jun 2005 15:09:02 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: <200506281846.j5SIkVu24880@raven.dms.auburn.edu> (message from Luc Teirlinck on Tue, 28 Jun 2005 13:46:31 -0500 (CDT)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:39823 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39823 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.