emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs-29 56cd810b9d1: Don’t signal warning when loading go-ts-mode.e


From: Eli Zaretskii
Subject: Re: emacs-29 56cd810b9d1: Don’t signal warning when loading go-ts-mode.el without grammar
Date: Sat, 04 Mar 2023 09:05:24 +0200

> From: Yuan Fu <casouri@gmail.com>
> Date: Fri, 3 Mar 2023 14:06:03 -0800
> Cc: emacs-devel@gnu.org
> 
> > So please revert those changes, as they go against what is planned for
> > Emacs 29.
> > 
> >>> made this even worse: now we have a byte-compilation warning in a
> >>> build without tree-sitter, and this code will signal a generic error
> >>> (whose text is not very helpful to users) if the file is loaded in a
> >>> build without tree-sitter.  This is all against the intended behavior
> >>> of these modes.
> >>> 
> >>> Again, what problem were you trying to fix with that change?
> >> 
> >> Treesit-ready-p is intended to be used for major modes, so it includes 
> >> checks for current buffer’s size, which doesn’t make much sense when 
> >> called when loading the file. But if you intentionally used that function 
> >> for the warning, I guess there is no harm using it this way, as the 
> >> default size threshold is rather large.
> > 
> > If we want to avoid the buffer size text in some cases, we can add an
> > optional argument to treesit-ready-p, and use it in those places.
> > (And I agree that the test is probably harmless anyway.)
> 
> I’ve reverted the change.

Thanks.



reply via email to

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