diff options
| author | Miles Bader | 2000-11-21 15:57:34 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-11-21 15:57:34 +0000 |
| commit | cc64f5c9e6675dd0f9b0d50ad4bdcefdc9ccf3e6 (patch) | |
| tree | 19e43f4fc66f6deb0fdec777db9dc3605d61d7e4 /src | |
| parent | 7aaf438830162ca4dd70beee6abf53dce7a6634f (diff) | |
| download | emacs-cc64f5c9e6675dd0f9b0d50ad4bdcefdc9ccf3e6.tar.gz emacs-cc64f5c9e6675dd0f9b0d50ad4bdcefdc9ccf3e6.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 19 |
1 files 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; | |||
| 86 | 86 | ||
| 87 | Lisp_Object Vminibuffer_history_position; | 87 | Lisp_Object Vminibuffer_history_position; |
| 88 | 88 | ||
| 89 | /* Text properties that are added to minibuffer prompts. | ||
| 90 | These are in addition to the basic `field' property, and stickiness | ||
| 91 | properties. */ | ||
| 92 | |||
| 93 | Lisp_Object Vminibuffer_prompt_properties; | ||
| 94 | |||
| 89 | Lisp_Object Qminibuffer_history, Qbuffer_name_history; | 95 | Lisp_Object Qminibuffer_history, Qbuffer_name_history; |
| 90 | 96 | ||
| 91 | Lisp_Object Qread_file_name_internal; | 97 | Lisp_Object Qread_file_name_internal; |
| @@ -521,8 +527,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 521 | Qrear_nonsticky, Qt, Qnil); | 527 | Qrear_nonsticky, Qt, Qnil); |
| 522 | Fput_text_property (make_number (BEG), make_number (PT), | 528 | Fput_text_property (make_number (BEG), make_number (PT), |
| 523 | Qfield, Qt, Qnil); | 529 | Qfield, Qt, Qnil); |
| 524 | Fput_text_property (make_number (BEG), make_number (PT), | 530 | Fadd_text_properties (make_number (BEG), make_number (PT), |
| 525 | Qread_only, Qt, Qnil); | 531 | Vminibuffer_prompt_properties, Qnil); |
| 526 | } | 532 | } |
| 527 | 533 | ||
| 528 | minibuf_prompt_width = current_column (); | 534 | minibuf_prompt_width = current_column (); |
| @@ -2437,6 +2443,15 @@ This also affects `read-string', but it does not affect `read-minibuffer',\n\ | |||
| 2437 | with completion; they always discard text properties."); | 2443 | with completion; they always discard text properties."); |
| 2438 | minibuffer_allow_text_properties = 0; | 2444 | minibuffer_allow_text_properties = 0; |
| 2439 | 2445 | ||
| 2446 | DEFVAR_LISP ("minibuffer-prompt-properties", &Vminibuffer_prompt_properties, | ||
| 2447 | "Text properties that are added to minibuffer prompts.\n\ | ||
| 2448 | These are in addition to the basic `field' property, and stickiness\n\ | ||
| 2449 | properties."); | ||
| 2450 | /* We use `intern' here instead of Qread_only to avoid | ||
| 2451 | initialization-order problems. */ | ||
| 2452 | Vminibuffer_prompt_properties | ||
| 2453 | = Fcons (intern ("read-only"), Fcons (Qt, Qnil)); | ||
| 2454 | |||
| 2440 | defsubr (&Sset_minibuffer_window); | 2455 | defsubr (&Sset_minibuffer_window); |
| 2441 | defsubr (&Sread_from_minibuffer); | 2456 | defsubr (&Sread_from_minibuffer); |
| 2442 | defsubr (&Seval_minibuffer); | 2457 | defsubr (&Seval_minibuffer); |