From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.bugs Subject: bug#55323: 29.0.50; Session-compiled interactive form gives (invalid-function #) Date: Thu, 12 May 2022 18:45:00 -0400 Message-ID: <25213.36332.986929.499425@orion.rgrjr.com> References: <25208.6664.823303.406026@orion.rgrjr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8693"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55323@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 13 00:46:11 2022 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 1npHZT-00024M-4U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 May 2022 00:46:11 +0200 Original-Received: from localhost ([::1]:54972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npHZR-0003gv-PF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 May 2022 18:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npHZK-0003gn-UL for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 18:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1npHZK-0004zf-Jx for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 18:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1npHZK-0005mR-Gn for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 18:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bob Rogers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 May 2022 22:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55323 X-GNU-PR-Package: emacs Original-Received: via spool by 55323-submit@debbugs.gnu.org id=B55323.165239551122151 (code B ref 55323); Thu, 12 May 2022 22:46:02 +0000 Original-Received: (at 55323) by debbugs.gnu.org; 12 May 2022 22:45:11 +0000 Original-Received: from localhost ([127.0.0.1]:42449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npHYV-0005lD-9l for submit@debbugs.gnu.org; Thu, 12 May 2022 18:45:11 -0400 Original-Received: from mail-qk1-f172.google.com ([209.85.222.172]:37804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npHYS-0005ks-5w for 55323@debbugs.gnu.org; Thu, 12 May 2022 18:45:09 -0400 Original-Received: by mail-qk1-f172.google.com with SMTP id 126so5897299qkm.4 for <55323@debbugs.gnu.org>; Thu, 12 May 2022 15:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rgrjr-com.20210112.gappssmtp.com; s=20210112; h=from:mime-version:content-transfer-encoding:message-id:date:to:cc :subject:in-reply-to:references; bh=13szyBOWkP2nbKu9peowMu96quAlBtNJX6LEaKTjCyk=; b=IFsy6I6OTQWK0y/RemeaG2KuUujz8hxhFMpu9OA/V3fy2mqvICZEWqV2ABJgYzaEaW LAgS0ypRlFrOvA4JbagK/SrWkXpXCVITP9oqPkQvhLRC0SsCIW1kPJo6asrinWI0PBe+ mbP1HLjGPVQFw/Akd7XF1ssSXcQIPetnx5++u/w8Uot5kOMt3S92DdJIthn0Jwjjkvgy llnWM0vNyyOnXmgJr2n1BpnXoWQnLHorBm0tAZl20vAgFmQ9UrZ71nCeRJWU2QodXexO C9/gN7+CTgXKt+VoNUfTGeg79z5dN9hrklpEf2v7b3DpMuLoBqodlluyIkAFkT4D1hfO CXDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:content-transfer-encoding :message-id:date:to:cc:subject:in-reply-to:references; bh=13szyBOWkP2nbKu9peowMu96quAlBtNJX6LEaKTjCyk=; b=T/TsYHU9xEHN+pB/fudRizfUZ0/h0BHn6CzRTC1Yel37YXY4Xh6nJr0JKFYCQIRxep kpqeARN3L4QL46VPJVPGLxkORcQTZxkeiabn7+Nrty91rrUfcWr6i+osRRkV969qy+oY rZiiUPvTerDBpDLSpbm9AYMQzsaJQbi1OL9PFr0UX3lK1vwAOgvmPUZZj4Ob/1eJAWuE uUupkv0PT8Z88Isn14fBxtLwM/MnKF4KtphwOjEQD13f4qE5Ub1juo9cfJ+Afuo1KAww PjhWbSZD3WNsiaaNUvqpq8pzg8kwuf76EpjrI6l5obEthFiTES3kNlNf3tPlg+iTb5ok M7mg== X-Gm-Message-State: AOAM533QqLO3v84H+mcORa3YflVvaGhgFnBtdt12t0+KqsWops/IkD7F /ch1axkZZh0pAET8jvCcP/HF8cO3NvdgCg== X-Google-Smtp-Source: ABdhPJzCC40+JwFkBPFbCzZjiJoiKNakQZw2lwBf9Ol5CHGFAgcBs5Hl2Xy6iKt6k/Qe4amU46TrvA== X-Received: by 2002:a05:620a:3ca:b0:69e:88ef:5c75 with SMTP id r10-20020a05620a03ca00b0069e88ef5c75mr1726953qkm.255.1652395502492; Thu, 12 May 2022 15:45:02 -0700 (PDT) Original-Received: from orion.rgrjr.com ([2601:19c:4600:3270:1eb7:2cff:fea9:e38b]) by smtp.gmail.com with ESMTPSA id v7-20020a05622a188700b002f39b99f6c5sm478411qtc.95.2022.05.12.15.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 15:45:02 -0700 (PDT) In-Reply-To: X-Mailer: VM 7.19 under Emacs 29.0.50 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:232101 Archived-At: From: Alan Mackenzie Date: Wed, 11 May 2022 15:20:04 +0000 Hello again, Bob. On Sun, May 08, 2022 at 15:29:12 -0400, Bob Rogers wrote: . . . > The problem occurs with an evaluated "interactive" form in a defun > that is compiled with compile-defun -- and it may have escaped notice > until now because it doesn't seem to happen if the source is part of > Emacs (i.e. is compiled in a file that git knows about). I think what's different is that the source has been copied into a different file, and that file doesn't have a ;; -*- lexical-binding:t -*- at the top. :-) Aha! That makes much more sense. I first encountered this in some of my own code which I've been lazy about switching to "lexical-binding:t". . . . > Disassembly shows that the interactive form is not compiled, and the > arglist is full of #: . . . Yes. For some reason, the interactive form is not compiled when both lexical-binding is nil AND the form looks like (list .....). I don't know why this is, and suspect it's a remnant of a very old bug fix which is no longer relevant. > And of course "M-x eval-defun" and "M-x byte-compile-file" continue > to DTRT, so I am not in any hurry for a fix. TIA, Would you please try out the following patch, which removes the positions from the symbols with positions in the arglist and the interactive form. Then please let me know how it goes. Thanks! . . . -- Alan Mackenzie (Nuremberg, Germany). The patch does work when I run my test case (though I get a different error because I'm not invoking align-highlight-rule appropriately). And (as you say) the "interactive" form is compiled when lexical-binding is nil. -- Bob