From unknown Thu Aug 21 12:10:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60027: 30.0.50; Suggestions for (info "(elisp) Local Variables") Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Dec 2022 03:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60027 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 60027@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167090244915272 (code B ref -1); Tue, 13 Dec 2022 03:35:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Dec 2022 03:34:09 +0000 Received: from localhost ([127.0.0.1]:57464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4w3V-0003yG-Fz for submit@debbugs.gnu.org; Mon, 12 Dec 2022 22:34:09 -0500 Received: from lists.gnu.org ([209.51.188.17]:39332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4w3T-0003yA-LU for submit@debbugs.gnu.org; Mon, 12 Dec 2022 22:34:08 -0500 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 1p4w3T-0006nb-Bg for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 22:34:07 -0500 Received: from mout.web.de ([217.72.192.78]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4w3R-0007FJ-Kz for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 22:34:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1670902442; bh=GuabILFBOkag0GV/8IGpri8nc1lRcUuY7UVkJQESLuY=; h=X-UI-Sender-Class:From:To:Subject:Date; b=i835xo3s1y93KP5L4dA8ZAMrYBRkZup1zCWJ9AoE4uiZ0Cp6pN4STpAq1akCRCeGv vF2o5AghS5stVTomZWmyeOjwVFzMrobc9CiAWhtKWOgVZwDPngFriB3/YDzvKfg7zB pbjdZyvdScxlEs99lrVRPChH73eOJEjFz4j1wG7/NSjfj9TbVuCKR9D8Zre0LFJGlo QQrGsCAgRHEaapjDEVYUNPcqRdbz+3uQmQXg2YzagRTgiq/nu3Z7V+HO5EOIMj60fw e2FHIhaaOEoYIuQLzy27H4HNQB5Fy7B1vqiH5eFUUoQms/DdO/wz6g6l1HoNJfgquB FEdUVivmyQQLA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([92.76.229.140]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N5CQh-1ouWdT07BV-010hIt; Tue, 13 Dec 2022 04:34:02 +0100 From: Michael Heerdegen Date: Tue, 13 Dec 2022 04:33:59 +0100 Message-ID: <875yeg2d08.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Vwu29e+WJlb3N6bwthHjylFAkIzLLcgy1Huv1TUcd+dQ2ObKvXy /zvjZe1hKA0r4pDpLXElE9hCWd8CwCCm49WRyEDfJGouU6y9vAdLwah+8OmjRFdI23PQMpT ujDPFyKh4irb83ivzppJujHdmTGlUxlfFgLIHiefJ37HgiSiLY6+PIopNO5Ahgbt3LrQLuf cRyi+wYsYtLuUdQs2/J4A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:z7Vsj5Wbmds=;QwSqPcO+KiOMSRPrLVs8WCb0Y1D tZEKero5v9mYOKOdCHBfQH/EcaqOXOWPAgeNqVb7aiP42SJZnDCZyF7IXWccVJ1S9anbWorFr Ylu/GBiV3BD2PkF2hZr+NRsAMdvwLUf0DDKf3ftpRtcbTD2dQH9n7pyutBoVGDDdouVznzpag yP3aNnoGQIZOFKPl/GMAe8WHFAovcfsdablkr8Q4HsjdYrKFUNnBa9D5JuwXn0rbJPIJQ/MXK PV81GvUGgZO+EMk8TAg4BorGoR+XJHeeO7Y9wpt68mQInSeedq+QNO4etlXRtsrGXXimNPT8D wK/vXjVBNpl6HaL9OOeuRoo3bEiJfxREEQdKIoyWgP9v1AWf0wt1eRGnJs+dm0cNbNvq3vHCi IiNoyY8FH31RieN0s2Nz2C6/RepAq37IF47AbThNlGPK47YHkDXK6PXAlkl83rEiZuCGb+5xX xPSEDfpE+LTpH6DD6QM/oN8WjLSTmUabD+MszX6CYffQI53+9qTpXtdd3XC8iBvjigErtRq8F JG1Rexpb1t/BtyIwUAeGtbBvnBznHyMwxVDtwg6L4msBTcqvXA9jbedSd7cJxF9QsEMbVnPCz f/w6YT5YEiPWPadDiDE/mGKhsmH0c+OwUylIlwR9rsAzK00ARKScdjSsDYeh1mTmXpZ6cBgpu 4gVDye4T1O6XWFVa0gzIrL9MEZ/dbiaiy8LS1ATLQI83JEgia2u5AP3bO0gnGXPqmvwMAxWa5 qtrV2qQVoenx0iyyhdK5jX7uDH8lfKTDLSVvsaV2Bvfa9CXqq3VZQeQ5Kxz83Xhyr/hVz1w+Y a23i/hohSIxvT6bAGvKjpzymXxixXpIcKK6S3rQK/vBTEyMXwUwkM8LcwvoJsgeQRVkKSoF43 jvlFoTTUaGa8Lq+KbEg8OCqZFBUSZ8BzIUS94fjsqDDhE4Tc+DODKpPoWC2Ej7In4QOpZ0puF DD1w5w== Received-SPF: pass client-ip=217.72.192.78; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hello, two thoughts about (info "(elisp) Local Variables"): (1) About saying that dynamical binding is the "default": | The default scoping rule in Emacs Lisp is called =E2=80=9Cdynamic scoping= =E2=80=9D, | which simply states that the current binding at any given point in the | execution of a program is the most recently-created binding for that | variable that still exists. For details about dynamic scoping, and an | alternative scoping rule called =E2=80=9Clexical scoping=E2=80=9D, *note = Variable | Scoping::. Likewise (info "(elisp) Variable Scoping"): | By default, the local bindings that Emacs creates are =E2=80=9Cdynamic | bindings=E2=80=9D. I think saying this gets more and more confusing to newbies, now that nearly all sources are in lexical binding, and *scratch* also is. It's opt-in so technically is not strictly wrong, but it is confusing nonetheless. I suggest to say something like that the default was dynamical binding for a long time but Emacs is moving towards using lexical binding as default. People must be prepared that they will see both dialects, and this will be the case for another 20 or 30 years at least, so it's not wrong to tell it's an intermediate state. But lexical binding is also not the exception any more, it is very present. (2) I want to suggest that in (info "(elisp) Local Variables") we add that (let* (BINDING1 BINDING2 ...) BODY...) is equivalent to (let (BINDING1) (let (BINDING2) (let ... BODY...))) This would help people to understand, offering a different description, and would also answer a question I often hear in emacs-help: If it is legal to specify the same symbol multiple times in `let*'. That node describes shadowing of bindings so this is a good place to address this question. Michael. From unknown Thu Aug 21 12:10:16 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Michael Heerdegen Subject: bug#60027: closed (Re: bug#60027: 30.0.50; Suggestions for (info "(elisp) Local Variables")) Message-ID: References: <83lenam1gh.fsf@gnu.org> <875yeg2d08.fsf@web.de> X-Gnu-PR-Message: they-closed 60027 X-Gnu-PR-Package: emacs Reply-To: 60027@debbugs.gnu.org Date: Wed, 14 Dec 2022 15:48:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1671032882-17313-1" This is a multi-part message in MIME format... ------------=_1671032882-17313-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #60027: 30.0.50; Suggestions for (info "(elisp) Local Variables") which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 60027@debbugs.gnu.org. --=20 60027: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60027 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1671032882-17313-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 60027-done) by debbugs.gnu.org; 14 Dec 2022 15:47:54 +0000 Received: from localhost ([127.0.0.1]:39997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5Tz8-0004UQ-1E for submit@debbugs.gnu.org; Wed, 14 Dec 2022 10:47:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5Tz5-0004Tm-J3 for 60027-done@debbugs.gnu.org; Wed, 14 Dec 2022 10:47:52 -0500 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 1p5Tz0-0002xn-9R; Wed, 14 Dec 2022 10:47:46 -0500 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=lHxAyB9b7GmYojMdzstHQYKbKr677oUfVtQ4KK5MH3I=; b=WAmYxx3n8PDG xM9r4FtVWYiy6mofFBv1L4SHzMIAfmL723EDhDa2H2J3M9gNJTqXtprMR1eRFWy5Ov6h0hzXwB8Mj lm0qX+kjBuA87+y/LiKxCzRxfcEnGBhk8jVh5XJiZ3tRAmJAa92zyGVbqpVb991nktOXKO79MqhMH tf9d5FnMiRuKu4wCHpMlZ0GUfMcj69KDFi8F/Rxzb97wzkEvjB8hPoKnjgea4+/JegBW4tcVsUv2l LTOoD8RbgMMHwYWAWauUKy/xVLCBqsMRi38cSBjbvOf6kxyrmnW8y9KF9KAQd7GxZmYa9ejBEElwR WKM5RPuYxtJFcoBfsr1FCQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5Tyz-0007Fa-LR; Wed, 14 Dec 2022 10:47:45 -0500 Date: Wed, 14 Dec 2022 17:47:42 +0200 Message-Id: <83lenam1gh.fsf@gnu.org> From: Eli Zaretskii To: Michael Heerdegen In-Reply-To: <875yeg2d08.fsf@web.de> (message from Michael Heerdegen on Tue, 13 Dec 2022 04:33:59 +0100) Subject: Re: bug#60027: 30.0.50; Suggestions for (info "(elisp) Local Variables") References: <875yeg2d08.fsf@web.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60027-done Cc: 60027-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Heerdegen > Date: Tue, 13 Dec 2022 04:33:59 +0100 > > two thoughts about (info "(elisp) Local Variables"): [...] Thanks, I made the changes you proposed on the emacs-29 branch, and I'm therefore closing this bug. ------------=_1671032882-17313-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Dec 2022 03:34:09 +0000 Received: from localhost ([127.0.0.1]:57464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4w3V-0003yG-Fz for submit@debbugs.gnu.org; Mon, 12 Dec 2022 22:34:09 -0500 Received: from lists.gnu.org ([209.51.188.17]:39332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4w3T-0003yA-LU for submit@debbugs.gnu.org; Mon, 12 Dec 2022 22:34:08 -0500 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 1p4w3T-0006nb-Bg for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 22:34:07 -0500 Received: from mout.web.de ([217.72.192.78]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4w3R-0007FJ-Kz for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 22:34:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1670902442; bh=GuabILFBOkag0GV/8IGpri8nc1lRcUuY7UVkJQESLuY=; h=X-UI-Sender-Class:From:To:Subject:Date; b=i835xo3s1y93KP5L4dA8ZAMrYBRkZup1zCWJ9AoE4uiZ0Cp6pN4STpAq1akCRCeGv vF2o5AghS5stVTomZWmyeOjwVFzMrobc9CiAWhtKWOgVZwDPngFriB3/YDzvKfg7zB pbjdZyvdScxlEs99lrVRPChH73eOJEjFz4j1wG7/NSjfj9TbVuCKR9D8Zre0LFJGlo QQrGsCAgRHEaapjDEVYUNPcqRdbz+3uQmQXg2YzagRTgiq/nu3Z7V+HO5EOIMj60fw e2FHIhaaOEoYIuQLzy27H4HNQB5Fy7B1vqiH5eFUUoQms/DdO/wz6g6l1HoNJfgquB FEdUVivmyQQLA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([92.76.229.140]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N5CQh-1ouWdT07BV-010hIt; Tue, 13 Dec 2022 04:34:02 +0100 From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Suggestions for (info "(elisp) Local Variables") Date: Tue, 13 Dec 2022 04:33:59 +0100 Message-ID: <875yeg2d08.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Vwu29e+WJlb3N6bwthHjylFAkIzLLcgy1Huv1TUcd+dQ2ObKvXy /zvjZe1hKA0r4pDpLXElE9hCWd8CwCCm49WRyEDfJGouU6y9vAdLwah+8OmjRFdI23PQMpT ujDPFyKh4irb83ivzppJujHdmTGlUxlfFgLIHiefJ37HgiSiLY6+PIopNO5Ahgbt3LrQLuf cRyi+wYsYtLuUdQs2/J4A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:z7Vsj5Wbmds=;QwSqPcO+KiOMSRPrLVs8WCb0Y1D tZEKero5v9mYOKOdCHBfQH/EcaqOXOWPAgeNqVb7aiP42SJZnDCZyF7IXWccVJ1S9anbWorFr Ylu/GBiV3BD2PkF2hZr+NRsAMdvwLUf0DDKf3ftpRtcbTD2dQH9n7pyutBoVGDDdouVznzpag yP3aNnoGQIZOFKPl/GMAe8WHFAovcfsdablkr8Q4HsjdYrKFUNnBa9D5JuwXn0rbJPIJQ/MXK PV81GvUGgZO+EMk8TAg4BorGoR+XJHeeO7Y9wpt68mQInSeedq+QNO4etlXRtsrGXXimNPT8D wK/vXjVBNpl6HaL9OOeuRoo3bEiJfxREEQdKIoyWgP9v1AWf0wt1eRGnJs+dm0cNbNvq3vHCi IiNoyY8FH31RieN0s2Nz2C6/RepAq37IF47AbThNlGPK47YHkDXK6PXAlkl83rEiZuCGb+5xX xPSEDfpE+LTpH6DD6QM/oN8WjLSTmUabD+MszX6CYffQI53+9qTpXtdd3XC8iBvjigErtRq8F JG1Rexpb1t/BtyIwUAeGtbBvnBznHyMwxVDtwg6L4msBTcqvXA9jbedSd7cJxF9QsEMbVnPCz f/w6YT5YEiPWPadDiDE/mGKhsmH0c+OwUylIlwR9rsAzK00ARKScdjSsDYeh1mTmXpZ6cBgpu 4gVDye4T1O6XWFVa0gzIrL9MEZ/dbiaiy8LS1ATLQI83JEgia2u5AP3bO0gnGXPqmvwMAxWa5 qtrV2qQVoenx0iyyhdK5jX7uDH8lfKTDLSVvsaV2Bvfa9CXqq3VZQeQ5Kxz83Xhyr/hVz1w+Y a23i/hohSIxvT6bAGvKjpzymXxixXpIcKK6S3rQK/vBTEyMXwUwkM8LcwvoJsgeQRVkKSoF43 jvlFoTTUaGa8Lq+KbEg8OCqZFBUSZ8BzIUS94fjsqDDhE4Tc+DODKpPoWC2Ej7In4QOpZ0puF DD1w5w== Received-SPF: pass client-ip=217.72.192.78; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hello, two thoughts about (info "(elisp) Local Variables"): (1) About saying that dynamical binding is the "default": | The default scoping rule in Emacs Lisp is called =E2=80=9Cdynamic scoping= =E2=80=9D, | which simply states that the current binding at any given point in the | execution of a program is the most recently-created binding for that | variable that still exists. For details about dynamic scoping, and an | alternative scoping rule called =E2=80=9Clexical scoping=E2=80=9D, *note = Variable | Scoping::. Likewise (info "(elisp) Variable Scoping"): | By default, the local bindings that Emacs creates are =E2=80=9Cdynamic | bindings=E2=80=9D. I think saying this gets more and more confusing to newbies, now that nearly all sources are in lexical binding, and *scratch* also is. It's opt-in so technically is not strictly wrong, but it is confusing nonetheless. I suggest to say something like that the default was dynamical binding for a long time but Emacs is moving towards using lexical binding as default. People must be prepared that they will see both dialects, and this will be the case for another 20 or 30 years at least, so it's not wrong to tell it's an intermediate state. But lexical binding is also not the exception any more, it is very present. (2) I want to suggest that in (info "(elisp) Local Variables") we add that (let* (BINDING1 BINDING2 ...) BODY...) is equivalent to (let (BINDING1) (let (BINDING2) (let ... BODY...))) This would help people to understand, offering a different description, and would also answer a question I often hear in emacs-help: If it is legal to specify the same symbol multiple times in `let*'. That node describes shadowing of bindings so this is a good place to address this question. Michael. ------------=_1671032882-17313-1--