From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#65209: 30.0.50; Unexpected behaviour of setq-local Date: Sun, 13 Aug 2023 06:16:42 +0200 Message-ID: <87r0o7r2z9.fsf@web.de> References: <953357c8-83b4-5d7f-7638-e79382ad164c@gmail.com> <87zg2yfn53.fsf@web.de> <2c06d6df-dd6d-78c4-f4dd-44cac8d95d84@gmail.com> <87h6p6dt0x.fsf@web.de> <83edk9hm2y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29185"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Gerd =?UTF-8?Q?M=C3=B6llmann?= , 65209@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 13 06:17:22 2023 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 1qV2Xa-0007Qv-Eb for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Aug 2023 06:17:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qV2XI-00069X-5L; Sun, 13 Aug 2023 00:17:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qV2XG-00069K-H4 for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 00:17:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qV2XG-0003YL-8O for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 00:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qV2XF-0000Uz-PF for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 00:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Aug 2023 04:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65209 X-GNU-PR-Package: emacs Original-Received: via spool by 65209-submit@debbugs.gnu.org id=B65209.16919002121899 (code B ref 65209); Sun, 13 Aug 2023 04:17:01 +0000 Original-Received: (at 65209) by debbugs.gnu.org; 13 Aug 2023 04:16:52 +0000 Original-Received: from localhost ([127.0.0.1]:57865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV2X6-0000UZ-Dk for submit@debbugs.gnu.org; Sun, 13 Aug 2023 00:16:52 -0400 Original-Received: from mout.web.de ([217.72.192.78]:54695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV2X4-0000UI-8d for 65209@debbugs.gnu.org; Sun, 13 Aug 2023 00:16:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1691900203; x=1692505003; i=michael_heerdegen@web.de; bh=iP0RDjhFXU6zZ65mkjWD/PIlC5V6x0HAqVu4fNRjCZQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=QXXzBaqXxXoaQOUUZxPYcKZ4nuxe9NDvWEg6X0PylPbmCxHznSEgIt7VdZqND3yM2I5Vq3y AfYhR/FWyKo1yfScwPFi2GVr+QR9PGlUIxfcd7szcM02hOMSK7BYCe9vxrIfDbqBL/OfS9YUY J2ffcc3Fz3zkAeWJwNLaYxft1EM0DnNfcQpk+H/PqeqNVbmJSdlH/P6fo23+8cFGLfMI/Yt/E 9JnhgplZlqWM5DFIGZbvZO8KkQPf013LZZgnA7GoPOvNH7NisHHcdGGPhT8GHK3CFJM7sks/a 764vUHOJKrHanepnHQQEt1IXyGyxz70QoWLqzSa3aLEfWYgMuVNA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([92.75.138.214]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mho0A-1prYz43uJk-00dpsU; Sun, 13 Aug 2023 06:16:42 +0200 In-Reply-To: <83edk9hm2y.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Aug 2023 14:09:41 +0300") X-Provags-ID: V03:K1:Hbo9TCc8LuwAT/LmHi+4lFGAtT3boYSiZyIZwChLPMp65/tmwt0 gbX+PoZE7qCfH3m9BJ6wk0mT0c/8IxBbp7wIueU8gOMBro865XL25CvChbGz5Q1/13qFxQq P5Og1FGjbQNk6o3UnCOK8If5lan99/ci6Rtufa4IfhE6GrSxD+Q0DTqor1p2sWNXF4mykze mFBT93cJppAFxKDXwAdaA== UI-OutboundReport: notjunk:1;M01:P0:DoM+n7JOBMI=;0CzY2HGfq1VuzTsRVxcRvTj94W3 idPn/rIGPr5ka6UCiv0t72lTxKgfoyo6o7NnLcYecJAZjNgFNXIfBZna+H9alf9q+0lFL1YWK rXgKBLzALiujbltHraNRMtiVprQlaxqDySKUG0fPnuLSIopcx4qJzTChustmzm6kApw0CpqYp uoUapz9xDba9pIvTRxpq8AX68fKBcypXOsBWdicDqoh12zrJrvaCaJFtftF9lyCECQ+pqPtJe gBTGnI7MJWBVdcVPFWm8SesrlFEuPOeCAJ1rgRPAcXOCGtaEWZVsLwFRMCheM6ACN/QqbDKkL T2CVGBgjEyeFyywuRFr58l8Y8FDepe+habz3d9IStaKcLL5Lcvv80rBvcvIu9XraQPqijzGJG VpUzrpMN9DdsUSYm8eN88oMLf3ZMOTL82lPnpmwLo1rHOZSKK5P+LpsB6kpi+x+ptPuV/958B meyJh/ugveZppDwLVn8XznU+UDQsHhjmFwBaAOyd65M3/DtvwsWvb2RYPmcyCVNI37LLhg7qf JbedJCtrzJEA9vOqcfX3+gxSkMe6w0Xj9CfenLDrxZHCmjSHV0o/VZFAFBKr5F1M78YERFGx0 4IzchrTUzk4LsIf/skm1iBsFlvGoxpyBek7bK/Aq9/umruVCiWimBcwSZQ5LuF+7ImYNSLCTr STvwIcVEFZn3dbI1pvtP9YSoWw85wOHygUHi8fHMTaqfXAIgDcVdNWBdbzyHXTg1xPhTdxKzz dNkqua0hTq94wVmKkHYoOqmxn8eirRGZxVGlAR769dWh7r7DN4O2B4cROtrl7Gr8E/HlQ2A9 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267337 Archived-At: Eli Zaretskii writes: > > > #+begin_src emacs-lisp > > > (progn > > > (defvar my-var :default-value) > > > (let ((my-var :let-value)) > > > (make-local-variable 'my-var) > > > (setq my-var :buffer-local-new)) > > > (list my-var (local-variable-p 'my-var))) ;; (:buffer-local-new t= ) > > > #+end_src > > > > > > `setq' sets the buffer local binding, not the global value the `let' > > > binding refers to. > I guess this bug can be closed, then? Or is there anything left to > do? After thinking more about it: I could explain the behavior of Gerd's recipes using the manual, but it doesn't explain the state in my above example _after_ the `let' has been left. The manual has a *Warning* section about mixing `let', buffer-local variables, and changing the current buffer. But it doesn't explain what happens in a single buffer when you `let'-bind a (declared) variable, make it local inside the `let', and finish the `let'. Is the variable still buffer-local afterwards, or does `let' remove the buffer-localness? With other words, is leaving a `let' the same as a `setq' to the remembered value, or is it more? Do we answer that question somewhere? If not, I suggest to add that, maybe as an example before the *Warning* section. Michael.