From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Espen Newsgroups: gmane.emacs.help Subject: Re: custom-themes BAD? Date: Tue, 25 Feb 2014 14:48:31 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393357813 24119 80.91.229.3 (25 Feb 2014 19:50:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Feb 2014 19:50:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 25 20:50:25 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WIO1I-0001A7-QB for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Feb 2014 20:50:24 +0100 Original-Received: from localhost ([::1]:36816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIO1I-0005Z0-F9 for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Feb 2014 14:50:24 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Injection-Info: mx05.eternal-september.org; posting-host="189748f827f5005aa08ac3cba2786117"; logging-data="28456"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+TwjVwn0612oSNhnp30qajuHBvRE1Nhy0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:QLFvKfPp0XSgRv9hV1YQYy3rlBg= sha1:dqtOUazZS2auar2DSx7HyqpbD0U= Original-Xref: usenet.stanford.edu gnu.emacs.help:203932 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96201 Archived-At: Rainer M Krug writes: > Dan Espen writes: >> If you use manoj-dark theme, then switch to another theme, >> manoj will leave behind a huge number of it's customizations, >> since other themes don't set as many fonts. > > Now this is an important point and raises one question: there is a > load-theme function - but not an unload-theme which removes the > customizations done by the package? An author of a theme can not be > expected to undo all changes another theme might have done - but one > could expect a package author to provide a function which unloads the > theme and restores the theme used before, or simply reset to the default > values. > > IMO, this is the problem with themes. It should be a simple matter for all themes to run a hook that removes the previous theme. Then have each theme define it's own hook function. But removing a face won't revert to the prior face, so each theme would have to query the current setting, then save it in the hook function for removal. I think it would be far easier to just have a set of about 20 or 30 faces that a theme is expected to set so the next theme can override those same 20 to 30 faces. Note, I'm not claiming 20 to 30 faces would be sufficient, but manoj-dark is almost 800 lines long. Certainly no one needs or wants 800 different faces. -- Dan Espen