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

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

bug#51665: 28.0.50; [PATCH] Get electric-tests to pass


From: Jim Porter
Subject: bug#51665: 28.0.50; [PATCH] Get electric-tests to pass
Date: Sun, 7 Nov 2021 10:31:50 -0800

On 11/7/2021 8:24 AM, Lars Ingebrigtsen wrote:
dick.r.chiang@gmail.com writes:

Subject: [PATCH] electric-tests can no longer by byte compiled

Isn't that the bug, though?  We've been trying to find out why.

I've been tinkering with this and I *think* the issue is with the hook I added at global scope:

  (add-hook 'c-mode-hook (lambda () (c-toggle-comment-style -1)))

In the attached patch, I moved this into a fixture function for the `whitespace-chomping-dont-cross-comments' test and it works for me (i.e. electric-tests pass both with and without byte-compilation). Hopefully this resolves the issue, though I'm unclear on *why* this was occurring in the first place; maybe there's a bug in the byte-compiler...?

(As an aside, I vaguely recall adding that hook at global scope because multiple tests failed without it, but it was a while since I wrote that patch and I may be misremembering. In any case, it seems that at least today, changing the comment style is only needed for that one test, so I think it makes sense to do it in a fixture solely for that test.)

Attachment: 0001-Fix-electric-tests.patch
Description: Text document


reply via email to

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