Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I couldn't find anything on this, so I'm asking it here. I can display a message in minibuffer with
(message "foo bar")
I would like to give only the message "foo bar" a red color in the minibuffer. Is that possible with Emacs?
M-x customiz-group RET minibuffer RET
Just use a string with faces.
(message (propertize "foo bar" 'face 'highlight))
Or use a different face, which has a red foreground. Or use a face property list:
(message (propertize "foo bar" 'face '(:foreground "Red")))
#("foo bar" 0 7 (face highlight))
(defun foo () (interactive) (message...))
Required, but never shown