GNU bug report logs -
#11938
24.1.50; Some not so useful CL related byte compiler warnings
Previous Next
Reported by: michael_heerdegen <at> web.de
Date: Fri, 13 Jul 2012 18:06:02 UTC
Severity: normal
Found in version 24.1.50
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> If I byte compile it, I get the following warnings:
> progv-bug.el:7:37:Warning: global/dynamic var `body' lacks a prefix
> progv-bug.el:10:25:Warning: reference to free variable `a'
> progv-bug.el:10:27:Warning: reference to free variable `b'
> progv-bug.el:11:35:Warning: reference to free variable `year'
> progv-bug.el:19:1:Warning: `labels' is an obsolete function (as of 24.2); use
> `(quote cl-labels)' instead.
Yay!! So there are progv users after all! Amazing!
> In detail:
> progv-bug.el:7:37:Warning: global/dynamic var `body' lacks a prefix
> Dunno what that means, the code doesn't include such a variable.
Yes, it's a bug of my new progv code, which introduces this var.
Should be fixed now, thank you.
> progv-bug.el:10:25:Warning: reference to free variable `a'
> progv-bug.el:10:27:Warning: reference to free variable `b'
> progv-bug.el:11:35:Warning: reference to free variable `year'
> Not very useful, since the variables' values are never looked up
> before they are bound, but ok, I can live with it.
Yes, I think these warnings were already present with Emacs-24.1's
version of progv.
I'm curious, actually. What does Common-Lisp do with something like:
(let ((a 2)) (progv '(a b) '(1 2) a))
does it return 2 (the value of the lexically-scoped var `a') or 1?
If it should return 1, what about:
(let ((a 2)) (progv '(b) '(1) a))
In any case, for all uses of progv where the first arg is a constant,
you'd be much better off using pcase-let (or destructuring-bind or
multiple-value-bind).
So maybe you're not a user of progv after all.
> progv-bug.el:19:1:Warning: `labels' is an obsolete function (as of 24.2); use
> `(quote cl-labels)' instead.
> What does `(quote cl-labels)' mean? I guess this should be just
> `cl-labels'.
Indeed, that was a copy&paste typo, thank you for catching it,
Stefan
This bug report was last modified 13 years ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.