简体   繁体   English

在Emacs中,如何在具有字体外观属性的迷你缓冲区中显示消息?

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

我想在迷你缓冲区中显示彩色的文本字符串,但是当我使用'message'函数时,文本属性被剥离。

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. 你可能有(message (propertize ...)) ,它将属性字符串解释为格式控制字符串,因此剥去了它的属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM