unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Bob Rogers <rogers@rgrjr.com>
To: Alan Mackenzie <acm@muc.de>
Cc: 55323@debbugs.gnu.org
Subject: bug#55323: 29.0.50; Session-compiled interactive form gives (invalid-function #<symbol list at 476>)
Date: Thu, 12 May 2022 18:45:00 -0400	[thread overview]
Message-ID: <25213.36332.986929.499425@orion.rgrjr.com> (raw)
In-Reply-To: <YnvUJLxLr9PN0fY7@ACM>

   From: Alan Mackenzie <acm@muc.de>
   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 #<symbol X at Y>:

   . . .

   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





  reply	other threads:[~2022-05-12 22:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-08 19:29 bug#55323: 29.0.50; Session-compiled interactive form gives (invalid-function #<symbol list at 476>) Bob Rogers
2022-05-10 10:32 ` Alan Mackenzie
2022-05-11 15:20 ` Alan Mackenzie
2022-05-12 22:45   ` Bob Rogers [this message]
2022-05-18  9:30     ` Alan Mackenzie

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=25213.36332.986929.499425@orion.rgrjr.com \
    --to=rogers@rgrjr.com \
    --cc=55323@debbugs.gnu.org \
    --cc=acm@muc.de \
    /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).