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

寵の児 提交于 2019-12-09 08:26:53

问题


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.



来源:https://stackoverflow.com/questions/2742435/in-emacs-how-do-i-display-a-message-in-the-minibuffer-with-font-face-properties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!