From: Alexander Shukaev <haroogan@gmail.com>
To: John Mastro <john.b.mastro@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Apply Emacs-Lisp `font-lock' rules to a string
Date: Wed, 26 Aug 2015 02:09:08 +0200 [thread overview]
Message-ID: <CAKu-7WzhRwokYy5M_GnJeUuNgBWNfjSsHqpFFq-=tC-_d-prSg@mail.gmail.com> (raw)
In-Reply-To: <CAKu-7WxcQ1JmbuMA0rq=rV2XC5uw-_R9TDE+aUp-a7bB=F2=CA@mail.gmail.com>
>>> (minibuffer-message
>>> (my-font-lock-string #'emacs-lisp-mode "\"\\\\(1\\\\|2\\\\)\""))
>>
>> Oops, got the arguments backward there:
>>
>> (minibuffer-message
>> (my-font-lock-string "\"\\\\(1\\\\|2\\\\)\"" #'emacs-lisp-mode))
>
> Cool! Thanks, John. I just want to point out that plain `message'
> also works fine if you do it like this (which is recommended anyway,
> even in the documentation):
>
> (message "%s" (my-font-lock-string ...))
Nevertheless, I still can't find a way to make
(user-error "%s" (my-font-lock-string ...))
display colored output. Any suggestions?
Regards,
Alexander
prev parent reply other threads:[~2015-08-26 0:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 3:19 Apply Emacs-Lisp `font-lock' rules to a string Alexander Shukaev
2015-08-24 20:07 ` Emanuel Berg
2015-08-24 20:23 ` John Mastro
2015-08-24 20:29 ` Alexander Shukaev
2015-08-24 20:39 ` John Mastro
2015-08-24 20:40 ` John Mastro
2015-08-25 22:38 ` Alexander Shukaev
2015-08-26 0:09 ` Alexander Shukaev [this message]
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='CAKu-7WzhRwokYy5M_GnJeUuNgBWNfjSsHqpFFq-=tC-_d-prSg@mail.gmail.com' \
--to=haroogan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=john.b.mastro@gmail.com \
/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).