[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Could the current font-lock mechanism support font locking code in c
From: |
Stefan Monnier |
Subject: |
Re: Could the current font-lock mechanism support font locking code in comments? |
Date: |
Tue, 30 Mar 2021 10:06:05 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Could current font lock support this somehow or there
> is no way that the same buffer part can be fontified
> two times by such competing rules?
`sm-c-mode` does exactly what you describe, except it does it inside
things the user doesn't think are comments: it sets up the buffer's
syntax-table such that preprocessor directives are treated a special
kinds of comments, and then it tells font-lock to apply the usual rules
inside those "comments".
IOW, the problem is just one of recognizing those comments that contain
code rather than text, which requires some kind of markup.
Stefan
- Could the current font-lock mechanism support font locking code in comments?, scame, 2021/03/30
- Re: Could the current font-lock mechanism support font locking code in comments?,
Stefan Monnier <=
- Re: Could the current font-lock mechanism support font locking code in comments?, scame, 2021/03/30
- Re: Could the current font-lock mechanism support font locking code in comments?, Stefan Monnier, 2021/03/30
- RE: [External] : Re: Could the current font-lock mechanism support font locking code in comments?, Drew Adams, 2021/03/30
- Re: [External] : Re: Could the current font-lock mechanism support font locking code in comments?, Arthur Miller, 2021/03/30
- Re: [External] : Re: Could the current font-lock mechanism support font locking code in comments?, Stefan Monnier, 2021/03/30
- RE: [External] : Re: Could the current font-lock mechanism support font locking code in comments?, Drew Adams, 2021/03/31
- RE: [External] : Re: Could the current font-lock mechanism support font locking code in comments?, Drew Adams, 2021/03/31