Subject: bug#6376: 23.2; byte compile add-to-list report free variable

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 31 Jan 2022 17:58:16 +0100

Kevin Ryde <[email-masked]> writes:

> I made a mistake with a variable name to add-to-list and wondered if the
> byte compiler might report
>
>     (add-to-list 'nosuchvariable ...)
>
> as a free variable, similar to the report for
>
>     (set 'nosuchvariable ...)

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I tried this byte-compiling such a file in Emacs 29, and I got:

Compiling file /tmp/foo.el at Mon Jan 31 17:56:17 2022
foo.el:2:15: Warning: reference to free variable ‘nosuchvariable’
foo.el:2:15: Warning: assignment to free variable ‘nosuchvariable’

So I guess it's been fixed at some point in the decade since this was
reported, and I'm therefore closing this bug report.  (If there's more
to be done, please respond to the debbugs address and we'll reopen.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no