From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: steve-humphreys@gmx.com Newsgroups: gmane.emacs.help Subject: Re: typeface for keyword Date: Tue, 16 Feb 2021 00:01:17 +0100 Message-ID: References: <87sg5xiav3.fsf@zoho.eu> <87sg5xusj9.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4280"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: steve-humphreys@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 16 00:01:59 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lBmsR-00010l-0m for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 16 Feb 2021 00:01:59 +0100 Original-Received: from localhost ([::1]:53220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBmsQ-00056l-1s for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 15 Feb 2021 18:01:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBmrq-00056R-Mj for help-gnu-emacs@gnu.org; Mon, 15 Feb 2021 18:01:22 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:36633) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBmrn-0000JP-Kp for help-gnu-emacs@gnu.org; Mon, 15 Feb 2021 18:01:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613430077; bh=J/qNGxz64aZK4ZSPjA/nuIbv6sEaiVk6Clpg+CHbask=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=L4bgeJ215Olewri9X5qjG6Mfsga1E4NC1q1mjD4n6cp7U/LFtFVrulVS/tM5buV+Q /xrfQ98DdDI6adNRNDbgehN/v01Ph+Qzm7SvgAON6K+VKVFq/s2ifMZ32UAkOGOJXX Xcg/YRoO6bCdwka39l3KCCFeKZ9/yU/Tl9UIENIw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs12.server.lan [172.19.170.180]) (via HTTP); Tue, 16 Feb 2021 00:01:17 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:YChDiA7gCnL7LWkgy9h1+3QsmzAM7i+oM2Pyd0GlX86ORVr4T6SVayIS89i0TUI4Vj006 cl1iIiQ/v0t7pHRK7IIkZ5Lx2MIXU5epcXUz7oAK8d2NH3z3NFijbb6mebxXOk0VMWnh6JfqWOlg Fyrpu3/9kQyDVtBFbbd8aRJnCpGBEb2maGcGrxggP/dUo8efb7RS2G3g3xZHoOuRdxVFLdPvTiBf sqq/b7vipot5L2ultZhnK83+Bc61+iZMOSFQAA2rI9R7dQMdXX5ofE2gPMQ56DiriYNd886IoOlH bM= X-UI-Out-Filterresults: notjunk:1;V03:K0:WPSya4P2u0I=:bQGUPBHqEOu0UUs1Kj+Wj0 E1yrMtB6DS9CILbF8YxNdVA2ssCd57OWM3nTTx1GKxgt2c8IQKfXwm1EPmXMwVnKpuH4foYVS 6PpczLgy7OMj25CUZMk94uE1QtPuAUZxw1E1K27eR29/07ErD7ydamw3W20pfcxBRGf0Q++Y9 X7TPXN3sU2FFdvPnlsy35qyzy/sPkiseDfWb0kDe77VvZBNSTZ2i+GpF29GXrMIhtcoNEITCx ehP3KM+D+soMYTw2wefZfk4T5H4XJBfu//Rjo6YjhYIJEPJboNnA5KNB5PKV7nTlbYLB2oUMq P1Lkn/Y3On9ZqNNQzHPuaMpbs5/A1e/pAkVyoxePEPNMRpYGi7DVk9eekucpKtAPNgDs/vhbY t2drJs9xAC9CyprEhyx5MmfhrWb+MWCixVaQZ+rGyxCcFccRsOIePlilNetQLSyeG7ljNr9sd WqY45ehYtn/F0OebTVIvwJx4xImGA4G5gjmb7W0GtzEY9+yZoAfzh17Srmv4JEIvuDYpYvkJt qgpNzJMuX2lT6onLtzmR+xlx6TKfvDas+L4cJE9K8zKwN86bfZX9iS6MlXxheQqsWghRc9KhM ypI6w2PEKpf8c= Received-SPF: pass client-ip=212.227.17.22; envelope-from=steve-humphreys@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128104 Archived-At: Can one make some functionality to select one face from another? For instance, have a face which can be updated to be one face or another. What is customarily done? (defface keyword-tface-foreground '( (default :inherit bold) ( ((class color) (background light)) :foreground "#00FF00" ) ( ((class color) (background dark)) :foreground "#00FF00" ) (t :inherit font-lock-builtin-face) ) "Colour typeface for keywords.") (defface keyword-tface '((default :inherit keyword-tface-foreground)) "Colour typeface for keywords.") (defface keyword-tface '((default :inherit font-lock-keyword-face)) "Colour typeface for keywords.") > Sent: Tuesday, February 16, 2021 at 7:22 AM > From: steve-humphreys@gmx.com > To: steve-humphreys@gmx.com > Cc: moasenwood@zoho.eu, help-gnu-emacs@gnu.org > Subject: Re: typeface for keyword > > Have coded the following for a user defined typeface. > I wonder how I could improve on this. > > (defface tface-foreground > '( (default :inherit bold) > ( ((class color) (min-colors 88) (background light)) > :foreground "#00FF00" ) > ( ((class color) (min-colors 88) (background dark)) > :foreground "#00FF00" ) > (t :inherit font-lock-builtin-face) ) > "User defined colour typeface.") > > (defface keyword-tface > '((default :inherit tface-foreground)) > "Colour typeface for keywords.") > > > > > > Sent: Tuesday, February 16, 2021 at 6:06 AM > > From: steve-humphreys@gmx.com > > To: moasenwood@zoho.eu > > Cc: help-gnu-emacs@gnu.org > > Subject: Re: typeface for keyword > > > > > > > Sent: Tuesday, February 16, 2021 at 5:53 AM > > > From: "Emanuel Berg via Users list for the GNU Emacs text editor" > > > To: help-gnu-emacs@gnu.org > > > Subject: Re: typeface for keyword > > > > > > steve-humphreys wrote: > > > > > > > It is a very useful utility. It was > > > > "font-lock-keyword-face". Am trying to define a face that > > > > I can change, so that the face is updated at multiple > > > > locations, by simply changing the font lock face. But this > > > > makes emacs complain. > > > > > > > > (defface tface > > > > '(:inherit font-lock-keyword-face) > > > > "Colour typeface to use.") > > > > > > If it is font-lock-keyword-face, why don't you just > > > change that? > > > > > > Or is it something you like about that face, that you want to > > > use for your face? > > > > It will let users easily change the face. that occurs in various place= s > > in the .el file. Would also like to define my own face and call that = in > > "tface", for instance use "tfcdye" below. > > > > (defface tfcdye > > '( (default :inherit bold) > > ( ((class color) (min-colors 88) (background light)) > > :foreground "#FF0000" ) > > ( ((class color) (min-colors 88) (background dark)) > > :foreground "#FF0000" ) > > (t :inherit font-lock-builtin-face) ) > > "Colour typeface for tex commands.") > > > > > > > -- > > > underground experts united > > > http://user.it.uu.se/~embe8573 > > > https://dataswamp.org/~incal > > > > > > > > > > > > > >