From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Custom themes and simple variables Date: Fri, 23 Oct 2009 13:35:55 -0400 Message-ID: <873a5arp1g.fsf@stupidchicken.com> References: <87ocny831r.fsf@stupidchicken.com> <87fx9aoxal.fsf@caeruleus.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256319492 19885 80.91.229.12 (23 Oct 2009 17:38:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Oct 2009 17:38:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ralf Angeli Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 23 19:38:05 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N1O5O-0004tR-Kl for ged-emacs-devel@m.gmane.org; Fri, 23 Oct 2009 19:37:58 +0200 Original-Received: from localhost ([127.0.0.1]:34509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1O5N-0007Vf-VE for ged-emacs-devel@m.gmane.org; Fri, 23 Oct 2009 13:37:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1O3Y-0006S3-3i for emacs-devel@gnu.org; Fri, 23 Oct 2009 13:36:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N1O3S-0006OZ-WF for emacs-devel@gnu.org; Fri, 23 Oct 2009 13:36:03 -0400 Original-Received: from [199.232.76.173] (port=60184 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1O3S-0006OP-Ra for emacs-devel@gnu.org; Fri, 23 Oct 2009 13:35:58 -0400 Original-Received: from pantheon-po43.its.yale.edu ([130.132.50.104]:44615) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N1O3S-0004AN-K3 for emacs-devel@gnu.org; Fri, 23 Oct 2009 13:35:58 -0400 Original-Received: from furry (dhcp128036014244.central.yale.edu [128.36.14.244]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n9NHZteI016671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 23 Oct 2009 13:35:55 -0400 Original-Received: by furry (Postfix, from userid 1000) id B0021C070; Fri, 23 Oct 2009 13:35:55 -0400 (EDT) In-Reply-To: <87fx9aoxal.fsf@caeruleus.net> (Ralf Angeli's message of "Fri, 23 Oct 2009 19:05:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:116338 Archived-At: Ralf Angeli writes: > There is a built-in list of viewers the user can choose from. And this > list is not supposed to be changed by the user. Therefore it is > declared with `defvar'. (The user can add or overwrite viewers in a > separate, customizable variable which is defined with `defcustom'.) > > The idea now is that the list of predefined viewers only contains > viewers for the chosen platform. Per default viewers available on > GNU/Linux would be offered but if a theme for MiKTeX on Windows were > enabled, only viewers available on Windows would be displayed. Why not automatically detect the system type in the initialization form for either the defvar'ed list of built-in viewers, or the defcustom default for the user viewer? I.e., either (defvar available-viewers (cond (eq system-type 'gnu/linux) ....)) or (defcustom my-viewer (cond (eq system-type 'gnu/linux) ....)) depending on whichever makes more sense for the particular situation.