Subject: bug#9109: 24.0.50; Warning: assignment to free variable (unwind-protect)

From: Roland Winkler <[email-masked]>
Date: Sun, 17 Jul 2011 10:37:12 -0500

cat > foo.el <<EOF
(unwind-protect
    (let ((foo "foo"))
      (insert foo))
  (setq foo "bar"))
EOF

Compiling foo.el results in the warning:

  bar.el:2:12:Warning: assignment to free variable `foo'

The line number is wrong. The assignment to free variable `foo' happens
in the unwindform.

In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2011-07-11 on regnitz