From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.help Subject: Use variable in setcustom Date: Sun, 10 Nov 2019 03:30:36 +0100 Message-ID: <20191110023036.r2gsq6znmykbol7q@Ergus> References: <20191110023036.r2gsq6znmykbol7q.ref@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="221990"; mail-complaints-to="usenet@blaine.gmane.org" To: Ergus via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 10 03:31:17 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iTd0W-000vbH-N6 for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Nov 2019 03:31:17 +0100 Original-Received: from localhost ([::1]:40916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTd0U-0002EL-Ux for geh-help-gnu-emacs@m.gmane.org; Sat, 09 Nov 2019 21:31:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50888) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTd0I-0002EB-3R for help-gnu-emacs@gnu.org; Sat, 09 Nov 2019 21:31:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTd0G-00054D-8Z for help-gnu-emacs@gnu.org; Sat, 09 Nov 2019 21:31:01 -0500 Original-Received: from sonic311-25.consmr.mail.ne1.yahoo.com ([66.163.188.206]:37111) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iTd0F-00053V-L7 for help-gnu-emacs@gnu.org; Sat, 09 Nov 2019 21:31:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1573353057; bh=lG04SH1MmXEbCCS4EZUNZ/xg2P2wieZwhnfuEfpwaqQ=; h=Date:From:To:Subject:References:From:Subject; b=SrMbsO2jDavF8Vuk5ZKmkNg5s6AETllJTNIokPn7a0z6UoOa5/z59ovMZmDHtXefDTqfPsJi5aVAT9CmmIbbndunMuPBGrcp9RABrNDWd2ZoX76eP0/2bz8oFoI/VmsK7fq1LGc54fI2ftATxMrXQqlK5EdXuvySYnm/38QHuTwSHYaYTgzKWMRmGWJjCZa67VORAcSiidRw9/s0u09ax+t1s1NgrFeKtydLzEigk276HoEz0TqtEzeyOOWbf6JtVkrWBSD+fqfa75XjNcP5yiikQ7DS7Z41503VZRc1+NHMKvdbt0u9BeKa4SCdIWyGMQz0GayseA3bMmR9xdWG4A== X-YMail-OSG: CUw_nN8VM1mobyA5F.FKpsy0HOxUSAIrdOWYYhVOwK7cvMEJmDDSr285.mcn301 ieA9IbHwoRCMPDIcb2GyGYVXVizyU4_xiOUpSJYX6jO6DqQPgl2328DFNUURf8dCOEi9nSqO3cng 2IaSwNnKwnarBRz.AbGrSaLKSDreiWfi1VO1IeVeNVyJR1WUF_g18J_gPg7LPWvT_8_XCVySYr7. mAwZi5jDjsNLvv46wgu2abqCirkGM32Ac.aR4cVTdiy.69T9k5HjYj._pz.7ZKDmzQJzdqN__.0t _wEIjCuaSZF8KvaXABtbW4r5d2kTbT66sPLF.lVb6xw1LfWCd7REsbew9CuEU3MKIUVZO.yuuWMY 8M6MdmYOWKw9nuVUGA5b53Atkmg9y_fs6f0ZvPd77UIZc3HERHRoRlujWbSZVP61282O29pvyZp2 LIAi_N16kvIS9VdGlSRV0lczERzmO_hsH1gVZ2FRjpJIjvFZmPzpTI31Eqh26tQSpRgUwFivDpZ8 UaIP.H65l9m7cWb64g.sUHOckL42UTkhWdVHyrS88FipVZi2yfhMOTQbvAZx4Ywg_E8MnOX8XM7d CZkI3_cUbx0xXnis3og3r44UcPhCRX85Hqy8nab1_MG19eNVkYbZBkixQPjJJEl4h.50Fi2dLUoE .p.9131DGJ5QcADg8ImrU3wcmMEePidKc8rdSm5CjV3zIC8x5SfMzU76HSrJizwzXulF9AcaKWXr E_x7JsWSNrUquBbLhrjkK_IFtFVO4jdx1QmVa2fWqC7LAc_Ruaz6gXQiLJUEWTWaJHVAIPk.pcGU JHOtuuGghQAtf2H.VM_h_VT5YE4k2XZffxu2SgxKUe Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Sun, 10 Nov 2019 02:30:57 +0000 Original-Received: by smtp417.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 77b5cf6e87ee06a688820e07a41d276f; Sun, 10 Nov 2019 02:30:52 +0000 (UTC) Content-Disposition: inline X-Mailer: WebService/1.1.14680 hermes Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_181) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 66.163.188.206 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.help:121816 Archived-At: Hi I want to have a simple colour palette that must be compatible with tui and gui. The problem is that the color names are not the same so for example the brightblack are not available in gui only in tui. To work around this I made: ``` (defconst my/colors '((black . "#000000") (red . "#cd0000") ... (brightcyan . "#00ffff") (brightwhite . "#ffffff")) "List of colors.") ``` And then I assign the colors with something like: ``` (set-face-foreground 'font-lock-preprocessor-face (cdr (assq 'magenta my/colors))) ``` But if I try to use a better method for my colors as Stefan suggested: (custom-set-face ...) It doesn't work. Do we have some method to define colours or paletes? So that I could use a similar approach like? ``` (set-face-foreground 'font-lock-preprocessor-face "mycolor") ``` Thanks in advance, Ergus