In Emacs, how do I display a message in the minibu

2020-06-07 07:49发布

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条回答
Summer. ? 凉城
2楼-- · 2020-06-07 08:01

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.

查看更多
登录 后发表回答