GNU bug report logs - #51695
29.0.50; lexical scope closure, interactive spec byte compiler warnings/usage issue

Previous Next

Package: emacs;

Reported by: Emanuel Berg <moasenwood <at> zoho.eu>

Date: Mon, 8 Nov 2021 23:41:02 UTC

Severity: normal

Tags: confirmed

Found in version 29.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 51695 <at> debbugs.gnu.org
Subject: Re: bug#51695: 29.0.50; lexical scope closure, interactive spec
 byte compiler warnings/usage issue
Date: Tue, 20 Sep 2022 14:13:08 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Thanks.  This is a limitation in `cconv.el` tho it will likely require
> further changes in `bytecomp.el` and/or `callint.c`.

Just recapping a bit here.  A less confusing function to reproduce the
problem:

;;; -*- lexical-binding: t -*-

(let ((data-item 1)
      (more-data 2))
  (defun echo-data (data)
    (interactive (list data-item))
    (message "data: %s %s" more-data data)))

This leads to the following warnings on the trunk:

In toplevel form:
foo.el:3:8: Warning: Unused lexical variable `data-item'
foo.el:6:24: Warning: reference to free variable ‘data-item’





This bug report was last modified 2 years and 244 days ago.

Previous Next


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