GNU bug report logs - #66136
29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment

Previous Next

Package: emacs;

Reported by: "Jens Schmidt" <jschmidt4gnu <at> vodafonemail.de>

Date: Thu, 21 Sep 2023 13:12:02 UTC

Severity: normal

Found in version 29.1

Done: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 66136 <at> debbugs.gnu.org (full text, mbox):

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>,  Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 66136 <at> debbugs.gnu.org
Subject: Re: bug#66136: 29.1; byte-compiler reports "misplaced interactive
 spec" with empty fct in lexical environment
Date: Sat, 23 Sep 2023 00:41:14 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> I know Mattias played with this part of the code (mostly to try and
> figure what to do about the ordering of the various possible kinds of
> declarations, which is a related yet different issue).  Maybe he has
> a more informed opinion.

One more data point for opinion building: When byte-compiling a
completely empty function (no declarations, no body forms):

------------------------- snip -------------------------
(let ((lexical-binding t))
  (byte-compile
   '(defun foo (arg))))
------------------------- snip -------------------------

some upper layer already seems to replace the empty body by a sole nil,
which is then kept by function `macroexp-parse-body':

-------------------- *trace-output --------------------
1 -> (macroexp-parse-body (nil))
1 <- macroexp-parse-body: (nil nil)
-------------------- *trace-output --------------------

So probably we should mimic that in `macroexp-parse-body' if there are
declarations, but no body forms?  Or change that upper layer to also add
a sole nil in the declarations-only case?




This bug report was last modified 1 year and 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.