From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: lexical-binding is turned on in more use cases Date: Wed, 11 Mar 2020 03:02:09 +0100 Message-ID: <87wo7rodi6.fsf@web.de> References: <83k13ubv3g.fsf@gnu.org> <83imjebsrh.fsf@gnu.org> <20200308193048.GB4832@ACM> <20200310191328.GB5046@ACM> <87lfo7q5e3.fsf@web.de> <20200310215334.GG5046@ACM> <87eetz4w1k.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="52269"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Alan Mackenzie , Eli Zaretskii , Stefan Monnier , Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 11 03:04:58 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jBqjx-000DRE-S7 for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Mar 2020 03:04:57 +0100 Original-Received: from localhost ([::1]:42678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBqjw-0005g9-MA for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Mar 2020 22:04:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57950) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBqhF-0004lx-Qc for emacs-devel@gnu.org; Tue, 10 Mar 2020 22:02:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBqhE-0001ia-LT for emacs-devel@gnu.org; Tue, 10 Mar 2020 22:02:09 -0400 Original-Received: from mout.web.de ([217.72.192.78]:56655) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBqhE-0001gL-8x; Tue, 10 Mar 2020 22:02:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1583892122; bh=JVxmscxXTJhjMyr4P/w+/6tPb1blZtNV7u8C7znPcZI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=dFZnT64i2E0U/r4woBN4VMqOS2TtwE84837S8EkTFfZhM3rZU85zGKgKLQsTJmi2I kJSWuNoQCTugeAKFMxsB7E48k0qgZTt0ZsPLgL3q+r6/m+T4B3t8/By5UwaeTffSYF cE4nORGJYhV7g0uHUo2OAQg6H3u5tlmE1SrzBW4k= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([92.208.89.41]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MVu1U-1indsQ0SOu-00X77d; Wed, 11 Mar 2020 03:02:02 +0100 In-Reply-To: (Noam Postavsky's message of "Tue, 10 Mar 2020 21:36:14 -0400") X-Provags-ID: V03:K1:j381RKIFkwi5vYG4IYO8MqOV6/u4xVmPUcLsxVaQODQ6dBRsFV0 IcGG21FzyFlgbB8kmnKOJE6JuMMq14+IWCqQOfEmdoo9tMKzFnjCbZkhqerQbiQTJbQNwQr l7odEgCV42pHXZB1RqZfQu4ipcWlazU0kYbmR6QBLp2t9LX/w1nl0d56K/My3yrkUEGSb0P NJdiXHzlfSLD4V5ICQNdw== X-UI-Out-Filterresults: notjunk:1;V03:K0:XnDi/jLEe8U=:Wf2u0IzOZBn9Beh8mhVnrd ggGvRTPVqqmwElddYlZuZqbO41V8V5frG82TcC3HhAN4mtk52SJtosUa2TXHMUbAE8PF3nQzB 6TFr5ArxJOeqyBa7t/dBfo67/cj9kGYAxNSDkhGhrPuHgS2sr1EuMtH/DrKxmfwYirOZaS2UU I/fEIfoS2IqHjOjivG9Sagmbo028UeI1iEK9zIaPtOeV2F8Q8IQKeHoB2hev0zM2sN2YQv47P BA0RtF49tvV9kdsE704yJlKjFt/WQnxCk0ZFKE9IBRHkhhTS8vIyQhWRv3mYt8I7cKq3fO78f cFGoo6xmnC6EpNrN62JuhnvuopFwHdfxjewg9tIzxhgKH1BatbmnYd82O36ire6gzVpAN5oyw GLVTng+WzfMJ7gyddrotjd+dWORi2szXHqZzA/V6RTGWaF+qQykqvb5cwL/iFOWaJk9yycz1v 21mUtdSKgzwF1kixUF4ejh/+NmcicpdUMQheJRGRd4eBF+01kp3ma5qpU6MEfT46OSLAq2mHA AYGNGf5rMejBFxJlNj8aGNj2bwAvsuedGZIAJUnAv4bd7JbY9Z2Xl0+EJ+fziUdLV1nFjCux3 wVn+j3NN9O2JZci0elOda87iVnuCje/DSIwiS+g6ACvyNq4bz0hL4XR/+tn0NPOEJNrblhyNr RVCBo5aiyxBTOJHIOV3nUkQ++J0BlPY734KmF2j0rQNjjoAbVXvEFlqo/Aj66hADKJw6GgkC8 3y47Rs+WCoIWBQDGvQfsk4cgDm74bJHjb+//4cGZ4XPqmYlhSQIGN2hy4hXOdMjfhg3NNNg5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.78 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245466 Archived-At: Noam Postavsky writes: > Actually, it only fails if you evaluate the (defun my-make-counter > ...) with lexical-binding off. That's what I expected, too, but I tested it quickly and it was as I said...sorry, it's late here. Maybe byte compiling the source also makes a difference? > > Were does M-: break for you with the change? > > Please, let's not go in circles. An example was already given > upthread: https://lists.gnu.org/r/emacs-devel/2020-03/msg00219.html > > Essentially some cc-mode variables are only declared dynamic locally > within individual files. Without lexical binding the only difference > this causes is that they are unbound at top level; but with > lexical-binding, outside of the declaring files (e.g., in M-: > expressions), let-binding those variables doesn't bind the value > dynamically. I meant "real" examples (that are not actually coding errors). I guess, like let-binding a variable that is not (yet) declared around an expression whose evaluation will autoload the declaration but it's too late for that binding and you get something unexpected. Michael.