Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Emacs, how do I display a message in the minibuffer with font face properties?

Tags:

I want to display a colored string of text in the minibuffer, but when I use the 'message' function, the text-properties of are stripped.

like image 884
Aemon Cannon Avatar asked Apr 30 '10 05:04

Aemon Cannon


1 Answers

Works for me:

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

You probably had (message (propertize ...)), which interprets the propertized string as a format control string, hence stripped of its properties.

like image 100
huaiyuan Avatar answered Sep 20 '22 15:09

huaiyuan