[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`message' function with propertized string
From: |
Drew Adams |
Subject: |
`message' function with propertized string |
Date: |
Thu, 30 Mar 2006 10:17:22 -0800 |
The doc of function `message' says that its string argument(s) can have
`face' properties and these will affect the appearance of the message. From
the Emacs 22 ELisp manual:
If STRING, or strings among the ARGUMENTS, have `face' text
properties, these affect the way the message is displayed.
Can someone explain how to do use `message' to display a message with faces
showing on different parts of the string? I tried this:
(message (propertize "foobar toto" 'face 'highlight))
and this:
(setq foo "foobar toto")
(add-text-properties 0 (length foo) '(face highlight) foo)
(message foo)
But the message displayed didn't show the face. It just showed the write
syntax of a propertized string: #("foobar toto" 0 11 (face highlight))
What am I missing? (I've tried with a June 2005 CVS snapshot and also with
Emacs 21.3.1.)
- `message' function with propertized string,
Drew Adams <=