From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11938: 24.1.50; Some not so useful CL related byte compiler warnings Date: Wed, 18 Jul 2012 06:25:16 -0400 Message-ID: References: <86liinh77s.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1342607173 4829 80.91.229.3 (18 Jul 2012 10:26:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2012 10:26:13 +0000 (UTC) Cc: 11938@debbugs.gnu.org To: michael_heerdegen@web.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 18 12:26:13 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SrRSM-0001Nx-95 for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2012 12:26:10 +0200 Original-Received: from localhost ([::1]:37362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrRSL-0002QI-FZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2012 06:26:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrRSF-0002PW-Ul for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 06:26:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrRS9-0001Sx-Fi for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 06:26:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrRS9-0001Ss-C7 for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 06:25:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SrRY2-0004n0-1u for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 06:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jul 2012 10:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11938 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11938-submit@debbugs.gnu.org id=B11938.134260748718366 (code B ref 11938); Wed, 18 Jul 2012 10:32:02 +0000 Original-Received: (at 11938) by debbugs.gnu.org; 18 Jul 2012 10:31:27 +0000 Original-Received: from localhost ([127.0.0.1]:47537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrRXS-0004mA-LL for submit@debbugs.gnu.org; Wed, 18 Jul 2012 06:31:26 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:33148) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrRXR-0004m4-BK for 11938@debbugs.gnu.org; Wed, 18 Jul 2012 06:31:26 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6IAPHlT022226; Wed, 18 Jul 2012 06:25:18 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C2DBEAECAF; Wed, 18 Jul 2012 06:25:16 -0400 (EDT) In-Reply-To: <86liinh77s.fsf@web.de> (Michael Heerdegen's message of "Fri, 13 Jul 2012 20:00:23 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4282=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4282> : streams <786628> : uri <1168360> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62089 Archived-At: > 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