[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 18:17:38 +0100 |
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.")
> Sent: Tuesday, February 16, 2021 at 3:55 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:
>
> > I am using the following typeface, but want to change so
> > that the face is the same as the typeface for keywords used
> > in the major mode that is loaded after opening the file
> > (e.g. texinfo, tex).
> >
> > (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.")
>
> It is easier to do it the other way around.
>
> First find out what face you want to change.
>
> Move point to the place where you see the face. Then use use
> this function:
>
> (defun what-face (pos)
> (interactive "d")
> (let ((face (or (get-char-property pos 'face)
> (get-char-property pos 'read-cf-name) )))
> (message "face: %s" (or face "no face")) ))
>
> After that, set the face to whatever you like.
>
> https://dataswamp.org/~incal/emacs-init/face.el
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>
- typeface for keyword, steve-humphreys, 2021/02/14
- Re: typeface for keyword, Emanuel Berg, 2021/02/15
- Re: typeface for keyword,
steve-humphreys <=
- Re: typeface for keyword, tomas, 2021/02/15
- Re: typeface for keyword, Emanuel Berg, 2021/02/15
- Re: typeface for keyword, steve-humphreys, 2021/02/15
- Re: typeface for keyword, steve-humphreys, 2021/02/15
- Re: typeface for keyword, steve-humphreys, 2021/02/15