emacs-devel
[Top][All Lists]
Advanced

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

Re: cc-mode fontification feels random


From: João Távora
Subject: Re: cc-mode fontification feels random
Date: Sun, 13 Jun 2021 10:05:37 +0100

On Sun, Jun 13, 2021 at 9:50 AM martin rudalics <rudalics@gmx.at> wrote:
>
>  >> I do not like, for example, that inserting a quotation mark somewhere
>  >> into a Lisp buffer, with some delay repaints the entire rest of the
>  >> buffer just to undo that when I insert the closing quotation mark.
>  >>
>  >
>  > Since recently, that shouldn't happen anymore unless you wait a relatively
>  > long time. That time is configurable. Search for "antiblink". I added the
>  > feature and am interested in knowing if it's not performing as it should.
>
> The idea is good but still not what I want.  I don't want the entire
> rest of my buffer get refontified even when I do not stay on the same
> line.

Right.  I was  strictly addressing your description of adding a single
quote and then watching the whole buffer repaint itself.  If one does other
editing or movement actions after that, then antiblink throws in the towels
and says "all bets are off, better not assume more things about the user's
fontification intentions".

That's because maybe you _do_ want the whole buffer to be refontified
and are intending to go to some point up to EOB to put the closing quote.

> What I really wanted is a simple mechanism that refontifies text only at
> most until the next open paren in column zero.  ISTR that Emacs behaved
> like that in the past - maybe I got used to it back then, maybe also my
> memory fails.

I don't have that recollection (but I think you have been using Emacs for
longer than me).

Regardless, I would file a bug if I saw that behaviour :-) , because it might
be my sincere intention to have the buffer be repainted.  I could be composing
a docstring or an example where an opening parenthesis happens to
have fallen on the first column of a line.

In fact I seem to remember that in SLIME or SLY that is already problematic
when evaluating a chunk of code where a docstring happens to have that
quirk.   And that it is because of open-paren-at-column-0-is-defun-start.

In another ISTR moment, ISTR that other editors do the same as Emacs
does here , i.e. repaint. I haven't seen an equivalent to antiblink.

João



reply via email to

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