unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [lennart.borgman@gmail.com: Re: map-y-or-n does not use minibuffer-prompt face]
@ 2007-02-26  3:27 Richard Stallman
  2007-02-26 10:26 ` Kim F. Storm
  0 siblings, 1 reply; 22+ messages in thread
From: Richard Stallman @ 2007-02-26  3:27 UTC (permalink / raw)
  To: emacs-devel

Would someone please install this?

------- Start of forwarded message -------
Date: Sun, 25 Feb 2007 17:09:10 +0100
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
MIME-Version: 1.0
To: emacs-pretest-bug@gnu.org
In-Reply-To: <45E190EF.7050104@gmail.com>
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
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2007-02-28 11:39 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-26  3:27 [lennart.borgman@gmail.com: Re: map-y-or-n does not use minibuffer-prompt face] Richard Stallman
2007-02-26 10:26 ` Kim F. Storm
2007-02-26 16:49   ` Lennart Borgman (gmail)
2007-02-27  7:38   ` Richard Stallman
2007-02-27  8:51     ` Lennart Borgman (gmail)
2007-02-27 15:05       ` Drew Adams
2007-02-27 15:11         ` David Kastrup
2007-02-27 16:18         ` Lennart Borgman (gmail)
2007-02-27 16:36           ` Mathias Dahl
2007-02-27 17:00             ` Drew Adams
2007-02-27 17:44             ` Lennart Borgman (gmail)
2007-02-27  9:31     ` Miles Bader
2007-02-27 22:20       ` Miles Bader
2007-02-27 23:32         ` Lennart Borgman (gmail)
2007-02-28  0:41           ` Miles Bader
2007-02-28  0:58             ` Lennart Borgman (gmail)
2007-02-28  8:55               ` Kim F. Storm
2007-02-28  9:27                 ` Lennart Borgman (gmail)
2007-02-28 11:14                   ` Kim F. Storm
2007-02-28 11:39                     ` Lennart Borgman (gmail)
2007-02-27 10:02     ` Kim F. Storm
2007-02-28  2:37       ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).