emacs-devel
[Top][All Lists]
Advanced

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

Re: Initial fontification in sh-mode with tree-sittter


From: Yuan Fu
Subject: Re: Initial fontification in sh-mode with tree-sittter
Date: Fri, 28 Oct 2022 01:12:26 -0700


> On Oct 27, 2022, at 4:40 PM, João Paulo Labegalini de Carvalho 
> <jaopaulolc@gmail.com> wrote:
> 
> A similar thing happens on python-mode with tree-sitter enabled.
> 
> Given a buffer with the following code:
> 
> defun foo():
>     return 42
> 
> If a multi-line comment is inserted as in:
> 
> """
> defun foo():
>     return 42
> """
> 
> The function definition does not get fontified as part of a comment. But if I 
> execute C-x x f, then everything looks good. Now If one of the markers is 
> deleted, nothing changes until I execute C-x x f, which then makes everything 
> look correct again.
> 
> It seems that an auto "refreshing" is missing. 

Hmmm, I couldn’t reproduce this in python-mode, also defun is not recognized in 
python so I used this snippet:

def foo():
    Return 42

When I insert “”” before the defun, everything after becomes string face, when 
I insert the following “””, everything is updated again.

I didn’t make any significant change to the font-lock code recently, either.

Yuan


reply via email to

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