From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#46387: 28.0.50; Compiled code making a variable dynamic stopped working Date: Tue, 09 Feb 2021 10:31:24 -0500 Message-ID: References: <87h7mm79ij.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38459"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: michael_heerdegen@web.de, 46387@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 09 16:32:25 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1l9V00-0009p6-F6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 16:32:20 +0100 Original-Received: from localhost ([::1]:40314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Uzz-0008Ld-5q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 10:32:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Uzi-0008Kj-S7 for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 10:32:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9Uzh-0005V5-S6 for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 10:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9Uzh-0003fZ-OZ for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 10:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Feb 2021 15:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46387 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: Michael Heerdegen , bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161288469314072 (code B ref -1); Tue, 09 Feb 2021 15:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Feb 2021 15:31:33 +0000 Original-Received: from localhost ([127.0.0.1]:54397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9UzF-0003eu-Jf for submit@debbugs.gnu.org; Tue, 09 Feb 2021 10:31:33 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9UzD-0003em-4W for submit@debbugs.gnu.org; Tue, 09 Feb 2021 10:31:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9UzC-0007vu-R2 for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 10:31:30 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:29218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9UzA-0005Et-K2 for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 10:31:30 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 35FB04409F4; Tue, 9 Feb 2021 10:31:27 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E425444019A; Tue, 9 Feb 2021 10:31:25 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1612884685; bh=DOh9NLQtfIGCJ2YK0zf9DrCozk2A5E16+FWpBf3TzS4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ND9KuFqiwIFchDIsxPgpr7nPM8gbBT4x8T3XfH+Ern49nAbjlE3davUIJdP9zKooB Ccp5QbzUtLlX4tqomnxIz9XqeywijCY1sESD28X+9IEgNrzTBezpS6VcwLa6r86oyB s08coc1cDIhoeLhAcoH3U+Exxi3hOjGHhKDmIx3ozQ2NvICkusf4taB9HvAtdUguzA wAcOsavUF8MLnu6Hdt1egShcFK9+FZy+JVpLxr1PZcU+S3gygEb2uHTGIEbY6+b39c bPnGi9+9gHVk5wADqYfKOiAZ02spUwkolku/2bjdOvg3NOZI0ali2KkGuqrtIsDQ7f KSR1IPXt0w0JA== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B262A1201C2; Tue, 9 Feb 2021 10:31:25 -0500 (EST) In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Tue, 9 Feb 2021 11:32:58 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199695 Archived-At: > There's a lack of clarity regarding the exact semantics of local > `defvar`. The manual says that its effect is confined to the current > lexical scope, but what exactly does that mean? Adding a variable to the context creates a new scope. A `progn` should not introduce a new scope. > As it turns out, parts of the implementation have different opinions > about that. Indeed, there's a fair bit a space between my above two statements. > As you observed, the recently added optimisation on master takes > a strict syntactic view: even a `progn` is a lexical scope, I think that's clearly an error. Adding/removing `progn` shouldn't make any difference in this respect. > (Stefan, it looks like your latest Gnus patch may fall in the same trap. Or?) The (with-suppressed-warnings (...) (defvar)) form is used at several places. It's the preferred way to declare a variable dynamically scoped without incurring the "not prefixed" warning and without making the `with-suppressed-warnings` silencer cover more code than intended. Stefan