GNU bug report logs -
#51665
28.0.50; [PATCH] Get electric-tests to pass
Previous Next
Reported by: dick.r.chiang <at> gmail.com
Date: Sun, 7 Nov 2021 16:20:01 UTC
Severity: normal
Tags: patch
Found in version 28.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Jim Porter <jporterbugs <at> gmail.com> writes:
> 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 general, doing an add-hook with a non-symbol function isn't
supported -- it may end up adding the function more than once if it
first loads the uncompiled file, and then loads the compiled file, I
think? (Because the lambda will have been turned into a byte-code
object.) So it seems logical that inhibiting byte compilation also made
the problem go away.
Anyway, your patch is the right fix here, so I've pushed it to Emacs 29
now.
> (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.)
Seems to work for me too here.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 256 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.