all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <E1HLWWP-0005I6-UG@fencepost.gnu.org> (raw)

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 -------

             reply	other threads:[~2007-02-26  3:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26  3:27 Richard Stallman [this message]
2007-02-26 10:26 ` [lennart.borgman@gmail.com: Re: map-y-or-n does not use minibuffer-prompt face] 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1HLWWP-0005I6-UG@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.