From 54b33868432b9727a27ce9fe4698ace9da120631 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Fri, 26 Dec 2008 09:39:49 +0000 Subject: [PATCH] * textprop.c (Qminibuffer_prompt): New variable. (syms_of_textprop): Initialize it. * callint.c (Fcall_interactively): For `c', `k', and `K' prompt in minibuffer-prompt face. (Bug#1662) --- src/ChangeLog | 7 +++++++ src/callint.c | 13 +++++++++++++ src/textprop.c | 3 +++ 3 files changed, 23 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index fbf378dd6de..4d4a7a51b20 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-12-26 Martin Rudalics + + * textprop.c (Qminibuffer_prompt): New variable. + (syms_of_textprop): Initialize it. + * callint.c (Fcall_interactively): For `c', `k', and `K' prompt + in minibuffer-prompt face. (Bug#1662) + 2008-12-25 Jason Rumney * buffer.c (Fbuffer_swap_text): Use POINTER_TYPE. diff --git a/src/callint.c b/src/callint.c index 467790ce6cf..1c644575821 100644 --- a/src/callint.c +++ b/src/callint.c @@ -45,6 +45,7 @@ extern Lisp_Object Vthis_original_command, real_this_command; Lisp_Object Vcommand_debug_status, Qcommand_debug_status; Lisp_Object Qenable_recursive_minibuffers; +extern Lisp_Object Qface, Qminibuffer_prompt; /* Non-nil means treat the mark as active even if mark_active is 0. */ @@ -541,6 +542,10 @@ invoke it. If KEYS is omitted or nil, the return value of break; case 'c': /* Character */ + /* Prompt in `minibuffer-prompt' face. */ + Fput_text_property (make_number (0), + make_number (SCHARS (callint_message)), + Qface, Qminibuffer_prompt, callint_message); args[i] = Fread_char (callint_message, Qnil, Qnil); message1_nolog ((char *) 0); /* Passing args[i] directly stimulates compiler bug */ @@ -594,6 +599,10 @@ invoke it. If KEYS is omitted or nil, the return value of { int speccount1 = SPECPDL_INDEX (); specbind (Qcursor_in_echo_area, Qt); + /* Prompt in `minibuffer-prompt' face. */ + Fput_text_property (make_number (0), + make_number (SCHARS (callint_message)), + Qface, Qminibuffer_prompt, callint_message); args[i] = Fread_key_sequence (callint_message, Qnil, Qnil, Qnil, Qnil); unbind_to (speccount1, Qnil); @@ -622,6 +631,10 @@ invoke it. If KEYS is omitted or nil, the return value of { int speccount1 = SPECPDL_INDEX (); specbind (Qcursor_in_echo_area, Qt); + /* Prompt in `minibuffer-prompt' face. */ + Fput_text_property (make_number (0), + make_number (SCHARS (callint_message)), + Qface, Qminibuffer_prompt, callint_message); args[i] = Fread_key_sequence (callint_message, Qnil, Qt, Qnil, Qnil); teml = args[i]; diff --git a/src/textprop.c b/src/textprop.c index 120c42843fe..35d92c95357 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -57,6 +57,7 @@ Lisp_Object Qlocal_map; /* Visual properties text (including strings) may have. */ Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; Lisp_Object Qinvisible, Qread_only, Qintangible, Qmouse_face; +Lisp_Object Qminibuffer_prompt; /* Sticky properties */ Lisp_Object Qfront_sticky, Qrear_nonsticky; @@ -2334,6 +2335,8 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and Qrear_nonsticky = intern ("rear-nonsticky"); staticpro (&Qmouse_face); Qmouse_face = intern ("mouse-face"); + staticpro (&Qminibuffer_prompt); + Qminibuffer_prompt = intern ("minibuffer-prompt"); /* Properties that text might use to specify certain actions */ -- 2.39.2