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

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

Re: newbie: font colors in minibuffer


From: Daniel Jensen
Subject: Re: newbie: font colors in minibuffer
Date: Thu, 14 Jun 2007 18:45:35 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

Pawel <address@hidden> 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 via email to

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