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
Date: Mon, 15 Feb 2021 16:55:44 +0100 [thread overview]
Message-ID: <87sg5xiav3.fsf@zoho.eu> (raw)
In-Reply-To: trinity-663662e6-76f6-4539-b869-ba141116e4fa-1613364798900@3c-app-mailcom-bs01
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
next prev parent reply other threads:[~2021-02-15 15:55 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 [this message]
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
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=87sg5xiav3.fsf@zoho.eu \
--to=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).