bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#59477: python-tests fail without tree-sitter


From: Yuan Fu
Subject: bug#59477: python-tests fail without tree-sitter
Date: Wed, 23 Nov 2022 14:00:51 -0800

Yuan Fu <casouri@gmail.com> writes:

> Mattias Engdegård <mattias.engdegard@gmail.com> writes:
>
>> The python-tests fail when Emacs is built without tree-sitter:
>
> Thanks. Seems to be some problem with expanding the font-lock region.
> I’m working on it.
>
> Yuan

The python-font-lock-assignment-statement-multiline-xxx tests failing
are due to me accidentally dropping code when copying around:

(setq-local font-lock-defaults
              `(,python-font-lock-keywords
                nil nil nil nil
                (font-lock-syntactic-face-function
                 . python-font-lock-syntactic-face-function)
                (font-lock-extend-after-change-region-function
                 . python-font-lock-extend-region)))

became

(setq-local font-lock-defaults
              `(,python-font-lock-keywords
                nil nil nil nil
                (font-lock-syntactic-face-function
                 . python-font-lock-syntactic-face-function)))

The python-tests--fill-long-first-line test fails because the retunred
buffer-string doesn’t have the newline at the end.

Specifically, the return of this form

(with-temp-buffer
      (insert "def asdf():
    \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123 SHOULDBEWRAPPED 
123 123 123 123

    \"\"\"
    a = 1
")
      (python-mode)
      (goto-char (point-min))
      (forward-line 1)
      (end-of-line)
      (fill-paragraph)
      (buffer-substring-no-properties (point-min) (point-max)))

Doesn’t have the newline at the end.

But if I run this in a buffer manually I get the ending newline. I’m not
sure what’s the cause of that.  Bisecting give
7c5d4348330b206aff1f8e5bc4fd241d6a6dc0b5, but that commit doesn’t change
anything filling-related.

Yuan





reply via email to

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