(Vminibuffer_prompt_properties): New variable.
(syms_of_minibuf): Initialize it. (read_minibuf): Add properties from Vminibuffer_prompt_properties to prompt, don't make read-only.
This commit is contained in:
parent
7aaf438830
commit
cc64f5c9e6
1 changed files with 17 additions and 2 deletions
|
@ -86,6 +86,12 @@ Lisp_Object Vminibuffer_history_variable;
|
|||
|
||||
Lisp_Object Vminibuffer_history_position;
|
||||
|
||||
/* Text properties that are added to minibuffer prompts.
|
||||
These are in addition to the basic `field' property, and stickiness
|
||||
properties. */
|
||||
|
||||
Lisp_Object Vminibuffer_prompt_properties;
|
||||
|
||||
Lisp_Object Qminibuffer_history, Qbuffer_name_history;
|
||||
|
||||
Lisp_Object Qread_file_name_internal;
|
||||
|
@ -521,8 +527,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
|
|||
Qrear_nonsticky, Qt, Qnil);
|
||||
Fput_text_property (make_number (BEG), make_number (PT),
|
||||
Qfield, Qt, Qnil);
|
||||
Fput_text_property (make_number (BEG), make_number (PT),
|
||||
Qread_only, Qt, Qnil);
|
||||
Fadd_text_properties (make_number (BEG), make_number (PT),
|
||||
Vminibuffer_prompt_properties, Qnil);
|
||||
}
|
||||
|
||||
minibuf_prompt_width = current_column ();
|
||||
|
@ -2437,6 +2443,15 @@ This also affects `read-string', but it does not affect `read-minibuffer',\n\
|
|||
with completion; they always discard text properties.");
|
||||
minibuffer_allow_text_properties = 0;
|
||||
|
||||
DEFVAR_LISP ("minibuffer-prompt-properties", &Vminibuffer_prompt_properties,
|
||||
"Text properties that are added to minibuffer prompts.\n\
|
||||
These are in addition to the basic `field' property, and stickiness\n\
|
||||
properties.");
|
||||
/* We use `intern' here instead of Qread_only to avoid
|
||||
initialization-order problems. */
|
||||
Vminibuffer_prompt_properties
|
||||
= Fcons (intern ("read-only"), Fcons (Qt, Qnil));
|
||||
|
||||
defsubr (&Sset_minibuffer_window);
|
||||
defsubr (&Sread_from_minibuffer);
|
||||
defsubr (&Seval_minibuffer);
|
||||
|
|
Loading…
Add table
Reference in a new issue