From unknown Sat Aug 16 00:32:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#11938 <11938@debbugs.gnu.org> To: bug#11938 <11938@debbugs.gnu.org> Subject: Status: 24.1.50; Some not so useful CL related byte compiler warnings Reply-To: bug#11938 <11938@debbugs.gnu.org> Date: Sat, 16 Aug 2025 07:32:34 +0000 retitle 11938 24.1.50; Some not so useful CL related byte compiler warnings reassign 11938 emacs submitter 11938 michael_heerdegen@web.de severity 11938 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 13 14:05:39 2012 Received: (at submit) by debbugs.gnu.org; 13 Jul 2012 18:05:39 +0000 Received: from localhost ([127.0.0.1]:39706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpkFG-0007Go-OJ for submit@debbugs.gnu.org; Fri, 13 Jul 2012 14:05:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49057) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpkFE-0007Gh-Ot for submit@debbugs.gnu.org; Fri, 13 Jul 2012 14:05:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Spk9k-0002ly-Qv for submit@debbugs.gnu.org; Fri, 13 Jul 2012 13:59:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:43415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Spk9k-0002ls-ND for submit@debbugs.gnu.org; Fri, 13 Jul 2012 13:59:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Spk9j-0003Sr-Iu for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2012 13:59:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Spk9i-0002lQ-BV for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2012 13:59:55 -0400 Received: from mout.web.de ([212.227.17.11]:50471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Spk9i-0002lI-1F for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2012 13:59:54 -0400 Received: from dragon.dragon ([188.99.174.188]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LpO4v-1TUsOQ41B7-00faaZ for ; Fri, 13 Jul 2012 19:59:52 +0200 Date: Fri, 13 Jul 2012 20:00:23 +0200 Message-Id: <86liinh77s.fsf@web.de> From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: 24.1.50; Some not so useful CL related byte compiler warnings X-Provags-ID: V02:K0:SdadwL+IzsdUIRp0LcBPJUK4sicl4tCcKZzr6umQ0O3 nIyIu9h9hrVJQjIuy2DP0xRsTLYh2Y3I3tY2+1Q+rgTvMq6d2M uXxsciEF7TKWc3RPtYchP6GLZOJp2AIfEIjoeBZOpmbXROleHg ApveyTxmM4D3RdEQXTHpwIiXkvDa7gvYNLTilzWA/UE5WqPMM2 Dmq+9eM0uRrF/VSL90uKqFoRv9ldkitFZM70lYoh2M= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: michael_heerdegen@web.de List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi, I create an example file with the following content: (eval-when-compile (require 'cl)) (defvar my-holiday-alist '((2012 . ((( 1 1) . "New Year"))))) (defun* my-holidayp (&optional date no-warn-if-no-info) (save-excursion (progv '(a b year) date (cdr (assoc (list a b) (cdr (or (assoc year my-holiday-alist) (prog1 nil ;always return nil (push (cons year ()) my-holiday-alist) ;; --> Warn only one time (unless no-warn-if-no-info (ding) (message "Note: No holiday info for %s in `my-holiday-alist'." year) (sit-for 3)))))))))) (labels ((fac (x) (if (< x 2) 1 (* x (fac (1- x)))))) (defun test () (fac 5))) 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. 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. 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. 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'. Thanks, Michael. In GNU Emacs 24.1.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2) of 2012-07-12 on keller, modified by Debian (emacs-snapshot package, version 2:20120712-1) Windowing system distributor `The X.Org Foundation', version 11.0.11201902 Configured using: `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/i386-linux-gnu/' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed -znocombreloc' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 13 14:24:01 2012 Received: (at 11938) by debbugs.gnu.org; 13 Jul 2012 18:24:02 +0000 Received: from localhost ([127.0.0.1]:39719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpkX3-0007h7-9d for submit@debbugs.gnu.org; Fri, 13 Jul 2012 14:24:01 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:35035) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpkX1-0007gw-9g for 11938@debbugs.gnu.org; Fri, 13 Jul 2012 14:24:00 -0400 Received: from frontend4.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3WYj371Xc2z4KK6r; Fri, 13 Jul 2012 20:19:31 +0200 (CEST) Received: from igel.home (ppp-93-104-150-219.dynamic.mnet-online.de [93.104.150.219]) by mail.mnet-online.de (Postfix) with ESMTPA id 3WYj1l3zTpzbbk1; Fri, 13 Jul 2012 20:18:19 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 331ADCA2A5; Fri, 13 Jul 2012 20:18:19 +0200 (CEST) From: Andreas Schwab To: michael_heerdegen@web.de Subject: Re: bug#11938: 24.1.50; Some not so useful CL related byte compiler warnings References: <86liinh77s.fsf@web.de> X-Yow: OKAY!! Turn on the sound ONLY for TRYNEL CARPETING, FULLY-EQUIPPED R.V.'S and FLOATATION SYSTEMS!! Date: Fri, 13 Jul 2012 20:18:19 +0200 In-Reply-To: <86liinh77s.fsf@web.de> (Michael Heerdegen's message of "Fri, 13 Jul 2012 20:00:23 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11938 Cc: 11938@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Michael Heerdegen writes: > 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'. Fixed. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 17 08:52:07 2012 Received: (at control) by debbugs.gnu.org; 17 Jul 2012 12:52:07 +0000 Received: from localhost ([127.0.0.1]:45637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sr7G3-0006Eg-7D for submit@debbugs.gnu.org; Tue, 17 Jul 2012 08:52:07 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:50493) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sr7G2-0006EZ-6T for control@debbugs.gnu.org; Tue, 17 Jul 2012 08:52:06 -0400 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 q6HCk378025031; Tue, 17 Jul 2012 08:46:04 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id A9683AE508; Tue, 17 Jul 2012 08:46:02 -0400 (EDT) From: Stefan Monnier To: michael_heerdegen@web.de Subject: Re: bug#11938: 24.1.50; Some not so useful CL related byte compiler warnings Message-ID: References: <86liinh77s.fsf@web.de> Date: Tue, 17 Jul 2012 08:46:02 -0400 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) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV4281=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4281> : streams <786133> : uri <1167553> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: control Cc: control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) close 11938 thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 18 06:31:27 2012 Received: (at 11938) by debbugs.gnu.org; 18 Jul 2012 10:31:27 +0000 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 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 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 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C2DBEAECAF; Wed, 18 Jul 2012 06:25:16 -0400 (EDT) From: Stefan Monnier To: michael_heerdegen@web.de Subject: Re: bug#11938: 24.1.50; Some not so useful CL related byte compiler warnings Message-ID: References: <86liinh77s.fsf@web.de> Date: Wed, 18 Jul 2012 06:25:16 -0400 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) MIME-Version: 1.0 Content-Type: text/plain 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-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 11938 Cc: 11938@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 18 20:26:28 2012 Received: (at 11938) by debbugs.gnu.org; 19 Jul 2012 00:26:28 +0000 Received: from localhost ([127.0.0.1]:49133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SreZX-0005Ad-W9 for submit@debbugs.gnu.org; Wed, 18 Jul 2012 20:26:28 -0400 Received: from mail-gg0-f172.google.com ([209.85.161.172]:36867) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SreZT-0005AO-Vl for 11938@debbugs.gnu.org; Wed, 18 Jul 2012 20:26:25 -0400 Received: by ggnc4 with SMTP id c4so2199442ggn.3 for <11938@debbugs.gnu.org>; Wed, 18 Jul 2012 17:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=jhXyXCEwUWkhd1ast70NlOnZmxdE4/QefngeN25va8c=; b=qbFlqcdby5eOaKC5Hzm6XXrBG5HhPc27hOzQQtyMkBEHq7fHvCbeukf3Hn4id+/a+c q5z3ydLqaCQATYpwCjeIZFXvrmpQnB00/xITcqSi2+kFFZM41laEsEpHtKpCwASoJx+r OhghVthBt7Qlf3BlsmYv8mHAc9SV684oJO7J1cwduv7g78q0h7RkC+ONYjEwVdT2cBx0 dnr/19/bMOUbboHYYcs5oKbbTTsIIPzYASzoehrwlYkx8oELV6iJ8rSg0a/WlgoqAFaN P5Y/rRF/TiUe25qyWzOIZcSfNGhJeADJ3P5tvPaNDOeQNAvmysZypA1Kql07G10BlRyU Z6bQ== Received: by 10.66.84.130 with SMTP id z2mr3544257pay.77.1342657212588; Wed, 18 Jul 2012 17:20:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.162.16 with HTTP; Wed, 18 Jul 2012 17:19:32 -0700 (PDT) In-Reply-To: References: <86liinh77s.fsf@web.de> From: Juanma Barranquero Date: Thu, 19 Jul 2012 02:19:32 +0200 Message-ID: Subject: Re: bug#11938: 24.1.50; Some not so useful CL related byte compiler warnings To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11938 Cc: michael_heerdegen@web.de, 11938@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Wed, Jul 18, 2012 at 12:25 PM, Stefan Monnier wrote: > 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? SBCL, CLisp and Clozure agree on the result: 2 Juanma From unknown Sat Aug 16 00:32:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 16 Aug 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator