unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: daniel@bigwalter.net (Daniel Jensen)
To: help-gnu-emacs@gnu.org
Subject: Re: newbie: font colors in minibuffer
Date: Thu, 14 Jun 2007 18:45:35 +0200	[thread overview]
Message-ID: <87k5u6trgw.fsf@orme.bigwalter.net> (raw)
In-Reply-To: mailman.2015.1181657760.32220.help-gnu-emacs@gnu.org

Pawel <paulino90@tenbit.pl> writes:

> following function displays message in MINIBUFFER:
>
> (defun pppp ()
>   "hallo"
>   (interactive)
>   (message "hallo from minibuffer"))
>
> Can You tell me what topic should I read to know how to change the
> color of "from" word.

Read about text properties and faces in the elisp manual. I would also
recommend looking through source code and learning from that.

Here is a version of your function that uses propertize to set the face
property. But you should use an existing face or define your own, so
that it can be customized.

(defun pppp ()
  "hallo"
  (interactive)
  (message "hallo %s minibuffer"
           (propertize "from" 'face '(:foreground "red"))))

       reply	other threads:[~2007-06-14 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2015.1181657760.32220.help-gnu-emacs@gnu.org>
2007-06-14 16:45 ` Daniel Jensen [this message]
2007-06-12 14:19 newbie: font colors in minibuffer Pawel
  -- strict thread matches above, loose matches on Subject: below --
2007-06-12 12:25 Pawel

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=87k5u6trgw.fsf@orme.bigwalter.net \
    --to=daniel@bigwalter.net \
    --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.
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).