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
\f
* Changes in Emacs 25.2
++++
+** Faces in `minibuffer-prompt-properties' no longer overwrite properties
+in the text in functions like `read-from-minibuffer', but instead are
+added to the end of the face list. This allows users to say things
+like `(read-from-minibuffer (propertize "Enter something: " 'face 'bold))'.
+
+++
** The new variable `extended-command-suggest-shorter' has been added
to control whether to suggest shorter `M-x' commands or not.
Qrear_nonsticky, Qt, Qnil);
Fput_text_property (make_number (BEG), make_number (PT),
Qfield, Qt, Qnil);
- Fadd_text_properties (make_number (BEG), make_number (PT),
- Vminibuffer_prompt_properties, Qnil);
+ if (Fconsp (Vminibuffer_prompt_properties))
+ {
+ /* We want to apply all properties from
+ `minibuffer-prompt-properties' to the region normally,
+ but if the `face' property is present, add that
+ property to the end of the face properties to avoid
+ overwriting faces. */
+ Lisp_Object list = Vminibuffer_prompt_properties;
+ while (CONSP (list))
+ {
+ Lisp_Object key = XCAR (list);
+ list = XCDR (list);
+ if (CONSP (list))
+ {
+ Lisp_Object val = XCAR (list);
+ list = XCDR (list);
+ if (EQ (key, Qface))
+ Fadd_face_text_property (make_number (BEG),
+ make_number (PT), val, Qt, Qnil);
+ else
+ Fput_text_property (make_number (BEG), make_number (PT),
+ key, val, Qnil);
+ }
+ }
+ }
}
unbind_to (count1, Qnil);
}