[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 00:38:38 +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 ...))
Regards,
Alexander