From: steve-humphreys@gmx.com
To: steve-humphreys@gmx.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: typeface for keyword
Date: Tue, 16 Feb 2021 00:01:17 +0100 [thread overview]
Message-ID: <trinity-96596077-13b7-4a9a-abad-3514334ab4da-1613430077597@3c-app-mailcom-bs12> (raw)
In-Reply-To: <trinity-eae36b36-634b-45d5-a431-256224f42840-1613416975728@3c-app-mailcom-bs12>
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" <help-gnu-emacs@gnu.org>
> > > 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 places
> > 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
> > >
> > >
> > >
> >
> >
>
prev parent reply other threads:[~2021-02-15 23:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 4:53 typeface for keyword steve-humphreys
2021-02-15 15:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-15 17:17 ` steve-humphreys
2021-02-15 17:51 ` tomas
2021-02-15 17:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-15 18:06 ` steve-humphreys
2021-02-15 19:22 ` steve-humphreys
2021-02-15 23:01 ` steve-humphreys [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-96596077-13b7-4a9a-abad-3514334ab4da-1613430077597@3c-app-mailcom-bs12 \
--to=steve-humphreys@gmx.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.