From: Miguel Guedes <miguel.a.guedes@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Apply faces to string output to mini-buffer
Date: 24 May 2013 08:38:13 GMT [thread overview]
Message-ID: <519f26f5$0$35155$862e30e2@ngroups.net> (raw)
In-Reply-To: mailman.301.1369381272.22516.help-gnu-emacs@gnu.org
On Fri, 24 May 2013 09:40:50 +0200, Stephen Berman wrote:
>
> The function `message' returns the printed representation of the
> message, so when you evaluate it in the minibuffer, this return value
> overwrites the propertized message, which is displayed in the echo area
> (which coincides with the minibuffer) as a side effect (on my machine I
> can see it briefly before it is overwritten). If you embed the message
> sexp in another function, it returns to the caller, so it doesn't
> overwrite the propertized message in the echo area. E.g., if you
> evaluate this:
>
> (defun my-foo ()
> (interactive)
> (message "%s" (propertize "foo" 'face '(:foreground "red"))))
>
> and then type `M-x my-foo', you'll see a red "foo" (without quotes) in
> the echo area.
I would never have got that. Thank you for the explanation & solution,
Stephen!
--
Miguel
next prev parent reply other threads:[~2013-05-24 8:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 10:50 Apply faces to string output to mini-buffer Miguel Guedes
2013-05-23 16:26 ` Eli Zaretskii
[not found] ` <mailman.259.1369326384.22516.help-gnu-emacs@gnu.org>
2013-05-24 5:27 ` Miguel Guedes
2013-05-24 6:30 ` Miguel Guedes
2013-05-24 7:40 ` Stephen Berman
[not found] ` <mailman.301.1369381272.22516.help-gnu-emacs@gnu.org>
2013-05-24 8:38 ` Miguel Guedes [this message]
2013-05-24 6:40 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='519f26f5$0$35155$862e30e2@ngroups.net' \
--to=miguel.a.guedes@gmail.com \
--cc=help-gnu-emacs@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.
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).