emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: Re: map-y-or-n does not use minibuffer-prompt face]


From: Richard Stallman
Subject: address@hidden: Re: map-y-or-n does not use minibuffer-prompt face]
Date: Sun, 25 Feb 2007 22:27:29 -0500

Would someone please install this?

------- Start of forwarded message -------
Date: Sun, 25 Feb 2007 17:09:10 +0100
From: "Lennart Borgman (gmail)" <address@hidden>
MIME-Version: 1.0
To: address@hidden
In-Reply-To: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Subject: Re: map-y-or-n does not use minibuffer-prompt face
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
        version=3.0.4

Lennart Borgman (gmail) wrote:
> The function `map-y-or-n-p' does not use minibuffer-prompt face.
> 
> To show this start Emacs with
> 
>    emacs -Q
> 
> then do
> 
>    M-x customize-face RET minibuffer-prompt RET
> 
> Set Foreground to red and click "Set for Current Session". Just to check 
> that the prompt is colored do
> 
>    M-x
> 
> Cancel the prompt and then paste this code into the *Scratch* buffer and 
> eval it:
> 
>   (map-y-or-n-p
>    "Prompt should have minibuffer-prompt face, object=%s? "
>    (function
>     (lambda(object)
>       (message "object=%s" object)))
>    '("a" "b"))
> 
> The prompt will not be colored.


Here is a patch for this. I would be glad if someone installed it. As 
usual I do not want to touch for CVS at this time.

Index: map-ynp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/map-ynp.el,v
retrieving revision 1.9
diff -u -r1.9 map-ynp.el
- --- map-ynp.el        21 Jan 2007 02:44:24 -0000      1.9
+++ map-ynp.el  25 Feb 2007 16:05:54 -0000
@@ -149,9 +149,14 @@
                     ;; Prompt in the echo area.
                     (let ((cursor-in-echo-area (not no-cursor-in-echo-area))
                           (message-log-max nil))
- -                    (message "%s(y, n, !, ., q, %sor %s) "
- -                             prompt user-keys
- -                             (key-description (vector help-char)))
+                       (let ((prompt-with-face
+                              (format "%s(y, n, !, ., q, %sor %s) "
+                                      prompt user-keys
+                                      (key-description (vector 
help-char)))))
+                         (add-text-properties
+                          0 (length prompt-with-face)
+                          minibuffer-prompt-properties prompt-with-face)
+                         (message "%s" prompt-with-face))
                       (if minibuffer-auto-raise
                           (raise-frame (window-frame (minibuffer-window))))
                       (while (progn


_______________________________________________
emacs-pretest-bug mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]