diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2016-05-01 16:53:38 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2016-05-01 16:53:38 +0200 |
commit | bf0b6fab032bd35fae36f7371b7cd1fe3bfaaac7 (patch) | |
tree | 4bbed3f5de389fea0f5f66a78a100d623accee2d /doc/lispref/minibuf.texi | |
parent | 8cfd9ba1a97a02157c6b730cca9d61b0fb7de53b (diff) | |
download | emacs-bf0b6fab032bd35fae36f7371b7cd1fe3bfaaac7.tar.gz |
Allow minibuffer prompts to use faces
* doc/lispref/minibuf.texi (Text from Minibuffer): Document
`minibuffer-prompt-properties' and explain how faces work in
the minibuffer prompt.
* src/minibuf.c (read_minibuf): If `face' is in
`minibuffer-prompt-properties', apply it to the end of the
face list to allow users to have their own faces on the
prompts (bug#16136).
Diffstat (limited to 'doc/lispref/minibuf.texi')
-rw-r--r-- | doc/lispref/minibuf.texi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 6f41090ebea..88662aba08a 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -170,6 +170,23 @@ non-@code{nil}, then the string that is returned includes whatever text properties were present in the minibuffer. Otherwise all the text properties are stripped when the value is returned. +@cvindex minibuffer-prompt-properties +The text properties in @code{minibuffer-prompt-properties} are applied +to the prompt. By default, this property list defines a face to use +for the prompt. This face, if present, is applied to the end of the +face list and merged before display. + +If the user wants to completely control the look of the prompt, the +most convenient way to do that is to specify the @code{default} face +at the end of all face lists. For instance: + +@lisp +(read-from-minibuffer + (concat + (propertize "Bold" 'face '(bold default)) + (propertize " and normal: " 'face '(default)))) +@end lisp + If the argument @var{inherit-input-method} is non-@code{nil}, then the minibuffer inherits the current input method (@pxref{Input Methods}) and the setting of @code{enable-multibyte-characters} (@pxref{Text |