From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65209: 30.0.50; Unexpected behaviour of setq-local Date: Wed, 23 Aug 2023 14:39:46 +0300 Message-ID: <83fs4arnr1.fsf@gnu.org> References: <87msyu2tmm.fsf@web.de> <80D7C281-C3DD-4DCA-9B14-1569E849CBC7@gmail.com> <87wmxqqq7d.fsf@web.de> <83350exl6h.fsf@gnu.org> <87wmxnojrb.fsf@web.de> <83msyjtkeo.fsf@gnu.org> <871qfu4dyx.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21116"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 65209@debbugs.gnu.org, monnier@iro.umontreal.ca To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 23 13:40:29 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 1qYmDt-0005Gl-5I for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Aug 2023 13:40:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYmDh-0006vQ-GY; Wed, 23 Aug 2023 07:40:19 -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 1qYmDe-0006ur-Gu for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 07:40:14 -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 1qYmDO-0008Rq-Ml for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 07:39:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYmDR-0000Sm-VJ for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 07:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Aug 2023 11:40: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.16927907761734 (code B ref 65209); Wed, 23 Aug 2023 11:40:01 +0000 Original-Received: (at 65209) by debbugs.gnu.org; 23 Aug 2023 11:39:36 +0000 Original-Received: from localhost ([127.0.0.1]:33029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYmD2-0000Rp-9u for submit@debbugs.gnu.org; Wed, 23 Aug 2023 07:39:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYmCz-0000RU-N5 for 65209@debbugs.gnu.org; Wed, 23 Aug 2023 07:39:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYmCp-0008Pv-Uv; Wed, 23 Aug 2023 07:39:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Nq6773s7NhrndsLTmlQALs2MVcUq7gJ6ixWuno3LDLo=; b=b7Q/hE6qd9Ln EQZPg4klBot8sssatokreOce6lRr4tmzvo4d2Fy2JC8iNcF61QvtKPN7CeEt7E9waBlA3EahqEz9i OjGmmlbfY06mbOaO/lJrQgyiYWCRW/QuzidLvFkmYMu+JB65cms/uYSXEMUWzzxOTtdemnC5I0b7N lC5szX7wsc3UmUcEFkk4i4tbfqqQR5Z98SuG08VgnOI/iRny+eNSexPwicdg1SPEXr2rijtkQ4e1+ GzD4l1koF9Zp4UvpG5NvVkBcgjPOfhEIoh4wLdPt8bSY7grR7l1RuSeiyJOR8J96IAX45MPRH9ufQ bxKkEyGh3btofh+5ecnNcA==; In-Reply-To: <871qfu4dyx.fsf@web.de> (message from Michael Heerdegen on Wed, 23 Aug 2023 05:47:18 +0200) 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:268227 Archived-At: > From: Michael Heerdegen > Cc: 65209@debbugs.gnu.org, gerd.moellmann@gmail.com, monnier@iro.umontreal.ca > Date: Wed, 23 Aug 2023 05:47:18 +0200 > > Ok - I'm not good at writing documentation. As a start, do you think > that it's possible to create a good addition to the manual out of this > stub? > > > | The following example demonstrates which binding is "seen" when > | let-binding and buffer-local variables are combined: > | > | (defvar var :default) > | > | (with-temp-buffer > | (let ((var :let-bound)) > | var ; --> :let-bound > | (setq-local var :buffer-local) > | var ; --> :buffer-local > | (with-temp-buffer var)) ; --> :let-bound > | var ; --> :buffer-local > | (with-temp-buffer var)) ; --> :default > | > | > | A lexical variable always refers to its lexical binding even when > | a buffer-local variable of the same name exists: > | > | (let ((lvar :lexical)) > | (setq-local lvar :local) > | lvar ; --> :lexical > | (symbol-value 'lvar)) ; --> :local Yes, but it has to be described in English, not (only) in Lisp. (TBH, the first one is almost self-evident, and I find nothing surprising or unexpected in it.) > I would not suggest such an addition if I would not have missed that > kind of information in the manual. Which part(s) did you miss? AFAIU, the behavior with dynamic variables is described in very clear terms which make the first example completely described.