[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make font lock work with comments?
From: |
Stefan Monnier |
Subject: |
Re: How to make font lock work with comments? |
Date: |
Sun, 02 Jan 2011 23:28:25 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Font locking is a tricky matter.
> (font-lock-add-keywords nil
> '(("⍝.*" 0 font-lock-comment-face prepend)
> ("[^\\]\"\\([^\"\\]*\\|\\.\\)\"" 0 font-lock-string-face prepend)))
Bad idea: font-lock normally uses syntax-tables for comments and
strings, so unless you *really* can't make it work with syntax-table,
you shouldn't do it via font-lock-keywords.
Stefan
- Re: How to make font lock work with comments?,
Stefan Monnier <=