From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#27674: 26.0.50; cl-progv: strange scoping due to implementation Date: Thu, 13 Jul 2017 02:36:51 +0200 Message-ID: <874luhf9zw.fsf@drachen> References: <87lgntfhky.fsf@drachen> <87r2xldw4s.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499906465 24452 195.159.176.226 (13 Jul 2017 00:41:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Jul 2017 00:41:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27674@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 13 02:40:57 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVSBW-0005Zz-SU for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jul 2017 02:40:50 +0200 Original-Received: from localhost ([::1]:56560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVSBc-000122-A6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jul 2017 20:40:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVS8r-0007Gy-Tq for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 20:38:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVS8o-0001TB-Qt for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 20:38:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33286) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVS8o-0001Sy-My for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 20:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVS8o-0003L7-Di for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 20:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2017 00:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27674 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27674-submit@debbugs.gnu.org id=B27674.149990623512783 (code B ref 27674); Thu, 13 Jul 2017 00:38:02 +0000 Original-Received: (at 27674) by debbugs.gnu.org; 13 Jul 2017 00:37:15 +0000 Original-Received: from localhost ([127.0.0.1]:35963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVS82-0003K6-A1 for submit@debbugs.gnu.org; Wed, 12 Jul 2017 20:37:15 -0400 Original-Received: from mout.web.de ([212.227.15.14]:60750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVS7z-0003Jr-OM for 27674@debbugs.gnu.org; Wed, 12 Jul 2017 20:37:12 -0400 Original-Received: from drachen.dragon ([88.73.234.235]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LkEaw-1e6Amq1vmE-00cBTu; Thu, 13 Jul 2017 02:36:54 +0200 In-Reply-To: <87r2xldw4s.fsf@users.sourceforge.net> (npostavs's message of "Wed, 12 Jul 2017 20:21:39 -0400") X-Provags-ID: V03:K0:Vszx0l0+inapNM3P5/M5xtmlQylP8jzZ4kvN5P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mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:134485 Archived-At: npostavs@users.sourceforge.net writes: > Michael Heerdegen writes: > > > The way `cl-progv' is implemented, we have some strange effects > > happening to closures in the body. For example, with lexical-binding > > on, > > > > (let ((x 0)) > > (cl-progv (list 'x) (list 1) > > (funcall (lambda () x)))) > > > > yields 0, and > > > > (cl-progv (list 'x) (list 1) > > (funcall (lambda () x))) > > > > yields 1. That isn't consistent (FWIW I would expect `1' in both > > cases). > > IMO, this is a bug in your program Why? >, this yields 1: > > (progn > (defvar x) > (let ((x 0)) > (cl-progv (list 'x) (list 1) > (funcall (lambda () x))))) Sure, but that's something different. I didn't want a special variable in my example. The doc of `cl-progv' doesn't mention that the symbols must correspond to special variables. Do I miss something? Michael.