emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] how to add font-lock keywords


From: Le Wang
Subject: Re: [O] how to add font-lock keywords
Date: Wed, 24 Aug 2011 12:25:44 +0800

Thanks for the hint, I tried this, but all my beautiful salad bowl
colours went away.

(font-lock-add-keywords 'org-mode '(("\"\\(\\(?:.\\|\n\\)*?[^\\]\\)\""
0 font-lock-string-face)))

Notice that I made a bad attempt to handle escaped quotation mark in
the string.  Does anyone know a better solution to handle escaped
characters in font-lock?

On Wed, Aug 24, 2011 at 9:17 AM, John Wiegley <address@hidden> wrote:
>>>>>> John Wiegley <address@hidden> writes:
>
>>>>>> Le Wang <address@hidden> writes:
>>> I wasn't able to google a clear examples of how to do this.  For example,
>>> I'd like to highlight all text between double-quotes.
>
>> Typically it looks something like this:
>
>>   (font-lock-add-keywords org-mode
> [...]
>
> Sorry, that should be 'org-mode, to name the symbol, not attempt to use its
> value.
>
> John
>
>
>



-- 
Le



reply via email to

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