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

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

Re: Apply faces to string output to mini-buffer


From: Miguel Guedes
Subject: Re: Apply faces to string output to mini-buffer
Date: 24 May 2013 06:30:32 GMT
User-agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)

On Fri, 24 May 2013 05:27:15 +0000, Miguel Guedes wrote:

For instance, the following doesn't work:

Eval:
(message "%s" (propertize "foo" 'face 'font-lock-variable-name-face))

Echoes:
#("foo" 0 3 (face font-lock-variable-name-face))

Eval:
(message "%s" (propertize "foo" 'face '(:foreground "red")))

Echoes:
#("foo" 0 3 (face (:foreground "red")))


Also, eldoc seems to also make use of `message' to output propertized 
strings (eldoc.el:206:0) so it (seems it) can be used for this purpose. 
Question is what's wrong with my approach above?


-- 
Miguel


reply via email to

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