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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.