help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apply Emacs-Lisp `font-lock' rules to a string


From: Alexander Shukaev
Subject: Re: Apply Emacs-Lisp `font-lock' rules to a string
Date: Wed, 26 Aug 2015 02:09:08 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]