From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51665: 28.0.50; [PATCH] Get electric-tests to pass Date: Sun, 07 Nov 2021 21:19:06 +0100 Message-ID: <87h7cng1mt.fsf@gnus.org> References: <877ddk9bve.fsf@dick> <87o86wexxj.fsf@gnus.org> <975de290-b8d7-b40a-715e-afe544623a93@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28205"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51665@debbugs.gnu.org, dick.r.chiang@gmail.com To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 07 21:20:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjoeA-00077g-Id for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Nov 2021 21:20:10 +0100 Original-Received: from [::1] (port=56990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjoe9-0003xn-EJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Nov 2021 15:20:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjoe2-0003xI-Uj for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 15:20:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjoe2-00010i-L6 for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 15:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjoe2-0002CQ-Fc for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 15:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 20:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51665 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51665-submit@debbugs.gnu.org id=B51665.16363163608402 (code B ref 51665); Sun, 07 Nov 2021 20:20:02 +0000 Original-Received: (at 51665) by debbugs.gnu.org; 7 Nov 2021 20:19:20 +0000 Original-Received: from localhost ([127.0.0.1]:54920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjodM-0002BS-IG for submit@debbugs.gnu.org; Sun, 07 Nov 2021 15:19:20 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:38264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjodK-0002BD-6b for 51665@debbugs.gnu.org; Sun, 07 Nov 2021 15:19:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XqClBZ/IyxisBHO6+smgon6T/yUSLLa39kXZEXeWjV4=; b=rlHoReV9GZisWr1Ar76WEFKI/l +4nvDuqP7x+IbCrKu6eKGtc8sn4lNlgZrw0d/HeHc9PASxoAKQQR9kzTUsdsUh2WUSDqeltgTgzje ffGABLuLg6LJ+Rk/fX4YU7CiJwWvL1aHGTfEVj4rmzqGQ2HqD8oF7DRGvDTHvGw+/i4U=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjodB-0003NZ-3h; Sun, 07 Nov 2021 21:19:11 +0100 X-Now-Playing: Marc Ribot's Ceramic Dog's _Hope_: "Maple Leaf Rage" In-Reply-To: <975de290-b8d7-b40a-715e-afe544623a93@gmail.com> (Jim Porter's message of "Sun, 7 Nov 2021 10:31:50 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219289 Archived-At: Jim Porter 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