unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: steve-humphreys@gmx.com
To: moasenwood@zoho.eu
Cc: help-gnu-emacs@gnu.org
Subject: Re: typeface for keyword
Date: Mon, 15 Feb 2021 18:17:38 +0100	[thread overview]
Message-ID: <trinity-81735604-33e1-4d89-ac23-ca61c0a1ccf9-1613409458037@3c-app-mailcom-bs12> (raw)
In-Reply-To: <87sg5xiav3.fsf@zoho.eu>

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



  reply	other threads:[~2021-02-15 17:17 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 [this message]
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

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=trinity-81735604-33e1-4d89-ac23-ca61c0a1ccf9-1613409458037@3c-app-mailcom-bs12 \
    --to=steve-humphreys@gmx.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).