From cc64f5c9e6675dd0f9b0d50ad4bdcefdc9ccf3e6 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 21 Nov 2000 15:57:34 +0000 Subject: [PATCH] (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. --- src/minibuf.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/minibuf.c b/src/minibuf.c index 29788a39467..3062f23e8ef 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -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); -- 2.39.2