unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: 51665@debbugs.gnu.org, dick.r.chiang@gmail.com
Subject: bug#51665: 28.0.50; [PATCH] Get electric-tests to pass
Date: Sun, 07 Nov 2021 21:19:06 +0100	[thread overview]
Message-ID: <87h7cng1mt.fsf@gnus.org> (raw)
In-Reply-To: <975de290-b8d7-b40a-715e-afe544623a93@gmail.com> (Jim Porter's message of "Sun, 7 Nov 2021 10:31:50 -0800")

Jim Porter <jporterbugs@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





  reply	other threads:[~2021-11-07 20:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 16:19 bug#51665: 28.0.50; [PATCH] Get electric-tests to pass dick.r.chiang
2021-11-07 16:24 ` Lars Ingebrigtsen
2021-11-07 18:31   ` Jim Porter
2021-11-07 20:19     ` Lars Ingebrigtsen [this message]
2021-11-07 17:25 ` Andy Moreton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7cng1mt.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=51665@debbugs.gnu.org \
    --cc=dick.r.chiang@gmail.com \
    --cc=jporterbugs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).