[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cc-mode fontification feels random
From: |
Stefan Monnier |
Subject: |
Re: cc-mode fontification feels random |
Date: |
Tue, 08 Jun 2021 11:22:21 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> E.g. in ELisp, what looks like a defun might actually be in the middle
>> of a string and there's no reliable way to know if something's in
>> a string other than to parse from BOB.
>> In C the situation is somewhat similar but for comments.
>
> So you are saying we need that just to know where the current defun
> begins?
Not really: the dependency goes the other way around.
The real question is "given a POS determine whether it is inside
a string or a comment or neither", which we need in all kinds of
circumstances (sometimes we need a bit more info than that, of course,
but this one is the killer).
Approaches like `open-paren-in-column-0-is-defun-start` try to answer
this question without parsing from BOB by making an assumption that if
something looks like a defun, then it is neither inside a string nor
a comment.
Stefan
- Re: cc-mode fontification feels random, (continued)
- Re: cc-mode fontification feels random, martin rudalics, 2021/06/13
- Re: cc-mode fontification feels random, João Távora, 2021/06/13
- Re: cc-mode fontification feels random, martin rudalics, 2021/06/14
- Re: cc-mode fontification feels random, João Távora, 2021/06/14
- Re: cc-mode fontification feels random, martin rudalics, 2021/06/14
- Re: cc-mode fontification feels random, João Távora, 2021/06/14
- Re: cc-mode fontification feels random, Eli Zaretskii, 2021/06/14
- Re: cc-mode fontification feels random, Stefan Monnier, 2021/06/14
- Re: cc-mode fontification feels random, Ergus, 2021/06/15
- Re: cc-mode fontification feels random, Eli Zaretskii, 2021/06/07
- Re: cc-mode fontification feels random,
Stefan Monnier <=
- Re: cc-mode fontification feels random, Eli Zaretskii, 2021/06/08
Re: cc-mode fontification feels random, Dmitry Gutov, 2021/06/05
Re: Re: cc-mode fontification feels random, Pedro Andres Aranda Gutierrez, 2021/06/06