From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [lennart.borgman@gmail.com: Re: map-y-or-n does not use minibuffer-prompt face] Date: Sun, 25 Feb 2007 22:27:29 -0500 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1172460637 5409 80.91.229.12 (26 Feb 2007 03:30:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Feb 2007 03:30:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 26 04:30:28 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HLWZH-0007V2-8F for ged-emacs-devel@m.gmane.org; Mon, 26 Feb 2007 04:30:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLWZH-0008Rv-7g for ged-emacs-devel@m.gmane.org; Sun, 25 Feb 2007 22:30:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HLWXx-00081c-28 for emacs-devel@gnu.org; Sun, 25 Feb 2007 22:29:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HLWXw-000818-43 for emacs-devel@gnu.org; Sun, 25 Feb 2007 22:29:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLWXv-00080y-Vm for emacs-devel@gnu.org; Sun, 25 Feb 2007 22:29:04 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HLWXv-0005TJ-IW for emacs-devel@gnu.org; Sun, 25 Feb 2007 22:29:03 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HLWWP-0005I6-UG; Sun, 25 Feb 2007 22:27:29 -0500 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66816 Archived-At: Would someone please install this? ------- Start of forwarded message ------- Date: Sun, 25 Feb 2007 17:09:10 +0100 From: "Lennart Borgman (gmail)" 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 -------