help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: typeface for keyword


From: steve-humphreys
Subject: Re: typeface for keyword
Date: Mon, 15 Feb 2021 20:22:55 +0100

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
> >
> >
> >
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]