From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 02 02:01:37 2024 Received: (at submit) by debbugs.gnu.org; 2 Apr 2024 06:01:37 +0000 Received: from localhost ([127.0.0.1]:52102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrXDF-000598-0R for submit@debbugs.gnu.org; Tue, 02 Apr 2024 02:01:37 -0400 Received: from lists.gnu.org ([2001:470:142::17]:57478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrXDD-00058U-0T for submit@debbugs.gnu.org; Tue, 02 Apr 2024 02:01:35 -0400 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 1rrXD2-0005UU-2E for bug-gnu-emacs@gnu.org; Tue, 02 Apr 2024 02:01:24 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrXD0-0004Aj-Fx for bug-gnu-emacs@gnu.org; Tue, 02 Apr 2024 02:01:23 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a4e60a64abcso257508266b.1 for ; Mon, 01 Apr 2024 23:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712037680; x=1712642480; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=JZhVeknb3IQkz+ukJ+rOnLbX7Rx0EpcIiJ0acleOtFI=; b=jNMpMXqWsATHl9UdYgADuQEDMvjkbKXZvZ8pwR1OEYxSpaj9XrcV0SvFOUGH5Y+skW t76/ofMLhdAE/va2cgdw3QK5pqVIggNa46VnpesGQexfMnmohgig/lYD684n+Mh1Jlah QBn7n4SrTCuIlLr1tDXXZnDchY6RrZFGoeLDDQ1ay7daDqK5q7q8Bp0TTx+gIB3Rfozv 8mkIGwKjdqSwuO9RvHBYppjSffX9IjctxBNuTPf3zPB7L1ZLWm3lg2q/MD0uahsepN7Z Hy988W3JipSQ4/6By8xvHehrllf6+GUTMaEC4MA73aqa7pfaQDQW0KStb4TxGdncSTcR eCrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712037680; x=1712642480; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JZhVeknb3IQkz+ukJ+rOnLbX7Rx0EpcIiJ0acleOtFI=; b=LPvQIeU1uAnSwIn+/Y5gw8A2ngV+BVyUl50knZa/DGy1kzoU4yesqdsD/IVYAMxE3A tWwNzyvCc0fVQBwi0FWKhVeklOdCP7LkCHlpHD3fYROfcbih9cx3rXFjGK7+8ervJPPA XjzTHK7K41BWFRKDdiLIuvhPOIpPXMZAGHRFdYFUP4H/DcHDVlj/bbKoWqT/+8P41X8c c7dGc6XPnhiom7zKglYogBw08NiMRZ06h0ihB7JIJbyy9FF0X95cuzS3K74oyvsFNYM5 4IwVLw64yqLJskR+D7MZtWBhNWCpf6acOc8qH+9jaGkuKXe7c9ApFV5MBuj0A7OMlq1B XsDQ== X-Gm-Message-State: AOJu0YzavdWJZDhQjvb/MaknOub/emwDqq7j2rZPTClfRAoBYUtIKTNG +g39ysTDiju9yAi0QtT5bAVF4N71BhgaPkAiD4IH4yJMwjFiTvjJXKI/6ih3 X-Google-Smtp-Source: AGHT+IGfFFXptOoWqqymIR+vDl9341Tcotxcpu2e1uM2KK7zI2500QkE27SjGy8PoSElf22A8JWLAQ== X-Received: by 2002:a17:907:7b9e:b0:a4e:512a:903c with SMTP id ne30-20020a1709077b9e00b00a4e512a903cmr7459272ejc.32.1712037680239; Mon, 01 Apr 2024 23:01:20 -0700 (PDT) Received: from ars3 ([2a02:8109:8a87:ff00::c15c]) by smtp.gmail.com with ESMTPSA id xc1-20020a170907074100b00a4e5a784843sm2937513ejb.168.2024.04.01.23.01.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 23:01:19 -0700 (PDT) From: Augusto Stoffel To: bug-gnu-emacs@gnu.org Subject: 30.0.50; pp-macroexpand-last-sexp buffers should turn lexical binding on X-Debbugs-Cc: Date: Tue, 02 Apr 2024 08:01:18 +0200 Message-ID: <87v8504829.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=arstoffel@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) 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: -0.0 (/) If you call pp-macroexpand-last-sexp in a buffer with lexical binding, the resulting *Pp Macroexpand Output* buffer has lexical binding turned off. The problem with this is that if you now go the *Pp Macroexpand Output* buffer and call pp-macroexpand-last-sexp again, this second macro expansion step may not reflect what would happen in the original buffer; I don't recall an example, but some macros expand differently in the two variable scoping modes. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 02 08:00:15 2024 Received: (at 70137) by debbugs.gnu.org; 2 Apr 2024 12:00:15 +0000 Received: from localhost ([127.0.0.1]:52918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrcoF-0005Rl-DZ for submit@debbugs.gnu.org; Tue, 02 Apr 2024 08:00:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrcoA-0005Pc-Rz for 70137@debbugs.gnu.org; Tue, 02 Apr 2024 08:00:10 -0400 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 1rrco1-0002za-OU; Tue, 02 Apr 2024 07:59:57 -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=CfntAjQF8tEUc3xpchRk7KpeWKHzTNu14XuRTKb5G8Q=; b=i3RBjcwO0gbp oVvOZwjlSV2JFjGUUTWVnQFiQxxvG51HEkw6hPvQ8Lh1U6Nr20M5d60F7Kxle/njzYdvcyfzmOGE4 v4lqIfWGmKfv9Mli59pu7i9hLIg9jD5iroVEK1z2no5JRUQaneWpbIDZ+KhKnYLuFjjg18esuVKVo ZKNZ1wc8tF7f3ZS4xnH4kNIq1ErCm1zMsVaLt30LxThq//mGRJDyVFozlmU+Avsmvm1UW6bUEq0Sa irolXAURUc9KKKzIuiTZpbxy+l3PWaoKk+JzAi56vDFdwqugZRALbJ0tKeY/YxAb9vJdPQbuM7+q6 OLwtwwBEZPOg0FJGJ4+f7g==; Date: Tue, 02 Apr 2024 14:59:21 +0300 Message-Id: <86le5w9dra.fsf@gnu.org> From: Eli Zaretskii To: Augusto Stoffel , Stefan Monnier In-Reply-To: <87v8504829.fsf@gmail.com> (message from Augusto Stoffel on Tue, 02 Apr 2024 08:01:18 +0200) Subject: Re: bug#70137: 30.0.50; pp-macroexpand-last-sexp buffers should turn lexical binding on References: <87v8504829.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70137 Cc: 70137@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: Augusto Stoffel > Date: Tue, 02 Apr 2024 08:01:18 +0200 > > If you call pp-macroexpand-last-sexp in a buffer with lexical binding, > the resulting *Pp Macroexpand Output* buffer has lexical binding turned > off. > > The problem with this is that if you now go the *Pp Macroexpand Output* > buffer and call pp-macroexpand-last-sexp again, this second macro > expansion step may not reflect what would happen in the original buffer; > I don't recall an example, but some macros expand differently in the two > variable scoping modes. Adding Stefan. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 02 16:55:43 2024 Received: (at 70137) by debbugs.gnu.org; 2 Apr 2024 20:55:43 +0000 Received: from localhost ([127.0.0.1]:56445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrlAV-0003dq-4Z for submit@debbugs.gnu.org; Tue, 02 Apr 2024 16:55:43 -0400 Received: from mout.web.de ([212.227.15.3]:34731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrlAT-0003cz-77 for 70137@debbugs.gnu.org; Tue, 02 Apr 2024 16:55:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1712091330; x=1712696130; i=michael_heerdegen@web.de; bh=LJQU+7XCPUjqzyOTuTYKeaIGEY1g44UNJVjlSF6dUZs=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=NtKUx283rc1+200VvklDz7EyiqIYP73/tTr/ILpEvWZD7Rn5Llu3BRVggRlB+bgd 6ZQyk8/6BTO1XVQSstcWRyAALlMUjoT9vj7edVbShB78cqorNlhRvF9KcwH54+DOE OJzY0xnJnncnDky4lPngVJcWPE1l2BZ4uC63BoH+9oCtBc49N8ReD5XT+BSyqosh1 yicCEtTBeJQYmMoZ1lVjHqleaKuIN+qkIKe6mBAjjXwBonbtv4TmIpfY883bo0UrS RnMoJP4mT6I6juEFwK2rC89o0PzcpU+83kOFfOywT1OHl4f4HJzlLesvfKowpy4RU q6j175mIuiIp9mw9cw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([84.60.174.170]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MpU1w-1saxIM0nvg-00pr5b; Tue, 02 Apr 2024 22:55:30 +0200 From: Michael Heerdegen To: Augusto Stoffel Subject: Re: bug#70137: 30.0.50; pp-macroexpand-last-sexp buffers should turn lexical binding on In-Reply-To: <87v8504829.fsf@gmail.com> (Augusto Stoffel's message of "Tue, 02 Apr 2024 08:01:18 +0200") References: <87v8504829.fsf@gmail.com> Date: Tue, 02 Apr 2024 22:56:07 +0200 Message-ID: <87r0fnscuw.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:xTQgzg/jokAh6Fsh/7v9V83mFRZAoOodz+cjQlV/f8HATW3HyR2 joMz12UBQEk7snMLV+iRmCkyqDRzF+ciZZORsfjLn3JfifqnoKdJkk03PV1oaSPoFVnF8XH cEkKZ1vgtpq4dUx+fgFdyp8Dsyv4VvKna0QMW019II053lACR6XZImfzfYCqk8HAvC+j1Yy FtwB0vxnkcqVm+7GmDdtg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:sWMzrLvju8I=;FtNUfhlJXNa/7YJX0SOKpgYWf8e U6bX3Al2HPaDa3Yi92VrPFAOr+HOJ81y87MXvse1cZwS72EdUYAC+C7XH0drto7TaA7N/XpAr NQ1HR/6Pe12HdJdPJcGcocvSt4eFqLoQb8k20li/+5DiQAt+PYwQkwOd7n7RKnSt7EqHguuwS eO7ySfp1Z3V6lCRQ9hxPl83wvZjXR7pIsANKN/kvOyTe/7Ytkis9Mkc3eWgtCu57aPrwYq4hx ZohWAAvS4HRA63Tn7surarCf0aJ0g4PW3K7cN43JwNbUPPy4tBQHLr12tWK3FqBz+INZQpbVF ZSRnn2FCC63pkMwcIbnUJ2P0an7lHxsUQNW9C7DoUADB7izpLaTsjm5e988N/rDUto5qkEl8k SF3MV6SRg4RUMfgo7lflXZzvj9Oodc6xzao38DdHj2NKCsZ/QH03XnWnkBpWqZFEtKjkx10vF lljezG1Z+ql3Ypz9jZZPxl2/r+lLm51Z1a+Zw1OhxWPqR0RdVt6wwoArjuZAM6MidPu+VT1ZR /8M8f9AMsumDjlwh+opSbOTcabNPSs8uJEMo5UvazoXfg+c1lMDFcMvi2jESoAh+uyTJ/MzPg 8yvBgWpNJEgC/3RF21Rzg2M3vElbuZMuXgVE2g1PvAfiD7wiwbZaZpuKgD7tsp2aSiPwsmLFO jG5TgTpuNpmJDWz2dywn4RTw2XX9KGDmhqxuxtrPpNHw9sVUQuvyujho/gcgROGmjSgUKceN/ q3V8/E5Fdd09qx6V18rN8sZKdvmquTS6qBcaC5nmIqejIow478E5OR+lrmmLBHAtpjXWbG7uV C2EdTCYwHkgrZzEhN8NsRYVFCaFBVLG1Kuy5EqZ4LdRgw= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 70137 Cc: 70137@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: -1.7 (-) Augusto Stoffel writes: > If you call pp-macroexpand-last-sexp in a buffer with lexical binding, > the resulting *Pp Macroexpand Output* buffer has lexical binding turned > off. Same as with any other displayed pp output buffer btw, or any temp buffer. All inherit the global lexical-binding -> nil binding. Not ideal indeed. Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 10 17:42:43 2024 Received: (at 70137) by debbugs.gnu.org; 10 Apr 2024 21:42:44 +0000 Received: from localhost ([127.0.0.1]:54462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rufiN-0003Qw-EM for submit@debbugs.gnu.org; Wed, 10 Apr 2024 17:42:43 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rufiH-0003P0-SN for 70137@debbugs.gnu.org; Wed, 10 Apr 2024 17:42:40 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CDAD74425B7; Wed, 10 Apr 2024 17:42:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1712785341; bh=kX3Gyt74Xf+Uq1IJ7wnta89Gkc4c+Q4kfdAqZxZMlf0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Q8ADcEE6JOr9awzFsSUWEJvI0ZIGj29QI3yH33MmExPbNASVyei1Zw5d3dn252vik ivtiT/VjkyagGkSdXnPhZmoW/71vjTvqH1+HPk9j2erytoE7yY9oXf5CkQJfoBZ4iw MLfaDpe613XOORE+7C+y6xxYpMhLKeRUYn2sc71ZOpYtdPwfk0Q8uMEQX2LFFBvTkP 5cgQz+Ad7jXFFSFrzs+YIR6aXefawO8vpaRXukOHvg+7WZN0Ee3xxu1Pi+b1bVrZ5i OnLj6VXbtpA3rFFOFJXO5f6Ev+Jy9V8FXPKGx3IrptyD3h+ZDzgOM68TWDe5fP2T2h GlJ2ItBgCZksw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5A8624425B0; Wed, 10 Apr 2024 17:42:21 -0400 (EDT) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 46B23120198; Wed, 10 Apr 2024 17:42:21 -0400 (EDT) From: Stefan Monnier To: Augusto Stoffel Subject: Re: bug#70137: 30.0.50; pp-macroexpand-last-sexp buffers should turn lexical binding on In-Reply-To: <87v8504829.fsf@gmail.com> (Augusto Stoffel's message of "Tue, 02 Apr 2024 08:01:18 +0200") Message-ID: References: <87v8504829.fsf@gmail.com> Date: Wed, 10 Apr 2024 17:39:43 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.073 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70137 Cc: 70137@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 (---) > If you call pp-macroexpand-last-sexp in a buffer with lexical binding, > the resulting *Pp Macroexpand Output* buffer has lexical binding turned off. > > The problem with this is that if you now go the *Pp Macroexpand Output* > buffer and call pp-macroexpand-last-sexp again, this second macro > expansion step may not reflect what would happen in the original buffer; > I don't recall an example, but some macros expand differently in the two > variable scoping modes. Indeed. `dolist` and `dotimes` were such examples (tho nowadays they return the same result). Most other examples I can think of signal an error when used without lexical binding. There are a few more subtle examples where the macro tests `macroexp--dynamic-variable-p`. Do you happen to have a patch to propagate the value of `lexical-binding` to the new buffer? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 14 03:42:40 2024 Received: (at 70137) by debbugs.gnu.org; 14 Apr 2024 07:42:40 +0000 Received: from localhost ([127.0.0.1]:34221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvuVb-0007BD-VC for submit@debbugs.gnu.org; Sun, 14 Apr 2024 03:42:40 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:49497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvuVW-0007AC-NG for 70137@debbugs.gnu.org; Sun, 14 Apr 2024 03:42:39 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-56e1baf0380so2266413a12.3 for <70137@debbugs.gnu.org>; Sun, 14 Apr 2024 00:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713080536; x=1713685336; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=uvJ4u/Lr6uEXMoPCXYOmqYAHeTsiPIOwuYb1rPbnmdM=; b=RuFm0nzzL7R5Nppz1jj1YV3qISqhyDR34jqSmUAhao8uy0dMRhiMecRRJz2R+ikJtj 0aoQ72zjEKdq6EfITn7AxIAdz1h4hsXIQhT8pdG8o+fYkXd1V6L2XPSlGgjsuiVDYtuz YSaXPZJrVKcn+v0ldlLJPaHFYa8CAlfau3wPaaLPpIALV8/YiEDHt0tvwjw/5e9FGA1g U8FZOZurqZH6beLAGh+CN2xSIUg8D78l0Ad2KmPnyHfOECPzgXeunZsrLa0gTOBDJLE4 3XVrtX1raOq4IyaACvq9r0g64n62DqpftfdJ8ZhFpY9iWX3kFduvmyE+R3qW8drWoB9i vudQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713080536; x=1713685336; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uvJ4u/Lr6uEXMoPCXYOmqYAHeTsiPIOwuYb1rPbnmdM=; b=TgnNjp69ZJOx+lC5+TaarFiB+WANfuDApbL1H0Plq0RS8aeiljiB2sVuq/fQgLMWwc ++tDX2cgFo1Dfk+XmEp25uc2WWdRWSf1DpxSy8gyy8wwdGdTjYyzjXAUJCjQncZVI0cT Wc0O81Pp6bAVTt1WyXOn+wMmrvtoGWzkFm9Wmn7R8+g7ZsPZbXq25B84KXOIJGp5yhn9 i6+nJ5y04u4Za1k4kZlCbwZ0sbw3ggWPuM1zfVBL15PVSkz9RaxS9CX+rsFBSwuiZSC6 fdq7dzszTxwlUh90W8ncEIz0LBx5K27MBrH+HVv0WyJXGjVDs05ftqWyWe0lfVavUNPJ /yDg== X-Gm-Message-State: AOJu0Yyf5xYUGDldAowCm1mCawgxxIMKrgaQOseGCuq7d8qBDxrLvlx1 sj07BC4ulagAyYoEfTTDu4qSioHCrvw27fvnojuUp1aNOQftOxID0gDhQw== X-Google-Smtp-Source: AGHT+IG3T/WWlpo5+SiNbPuMGqIfKCREsnCHSeMd1ZFgeHSuroiz7opOXANkoBQklVAOApmwKDVkiw== X-Received: by 2002:a50:9515:0:b0:568:8e22:4eff with SMTP id u21-20020a509515000000b005688e224effmr4039533eda.37.1713080535780; Sun, 14 Apr 2024 00:42:15 -0700 (PDT) Received: from ars3 ([2a02:8109:8a87:ff00::6223]) by smtp.gmail.com with ESMTPSA id v3-20020aa7dbc3000000b0057000659ed6sm2181602edt.46.2024.04.14.00.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 00:42:13 -0700 (PDT) From: Augusto Stoffel To: Stefan Monnier Subject: Re: bug#70137: 30.0.50; pp-macroexpand-last-sexp buffers should turn lexical binding on In-Reply-To: (Stefan Monnier's message of "Wed, 10 Apr 2024 17:39:43 -0400") References: <87v8504829.fsf@gmail.com> Date: Sun, 14 Apr 2024 09:42:12 +0200 Message-ID: <87zftwcrvv.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70137 Cc: 70137@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: -1.0 (-) --=-=-= Content-Type: text/plain On Wed, 10 Apr 2024 at 17:39, Stefan Monnier wrote: > Do you happen to have a patch to propagate the value of > `lexical-binding` to the new buffer? This would be the patch to propagate the lexical binding value. (A less magical alternative I guess would be to just always set it to t. Who needs to debug non-lexical code these days anyway?) It doesn't cover the new `pp-insert-short-sexp'. Here again setting lexical-binding=t by default might be okay. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Propagate-lexical-binding-value-to-pp-buffers.patch >From 8d81704d61153f13de516475f4e0ab53e8e94f11 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Sun, 14 Apr 2024 09:36:05 +0200 Subject: [PATCH] Propagate 'lexical-binding' value to pp buffers See bug#70137. * lisp/emacs-lisp/pp.el (pp-display-expression): Set lexical-binding to match the value in the calling buffer. --- lisp/emacs-lisp/pp.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index d586fc59939..f89807c37be 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -327,7 +327,8 @@ pp-display-expression If a temporary buffer is needed for representation, it will be named after OUT-BUFFER-NAME." - (let* ((old-show-function temp-buffer-show-function) + (let* ((lexical lexical-binding) + (old-show-function temp-buffer-show-function) ;; Use this function to display the buffer. ;; This function either decides not to display it at all ;; or displays it in the usual way. @@ -357,6 +358,7 @@ pp-display-expression (pp expression)) (with-current-buffer standard-output (emacs-lisp-mode) + (setq lexical-binding lexical) (setq buffer-read-only nil) (setq-local font-lock-verbose nil))))) -- 2.44.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 17 13:46:27 2024 Received: (at 70137) by debbugs.gnu.org; 17 Apr 2024 17:46:28 +0000 Received: from localhost ([127.0.0.1]:47164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx9MW-0004TB-1A for submit@debbugs.gnu.org; Wed, 17 Apr 2024 13:46:27 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx9MP-0004Rp-Qm for 70137@debbugs.gnu.org; Wed, 17 Apr 2024 13:46:21 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 728C010007D; Wed, 17 Apr 2024 13:45:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1713375953; bh=3JaG3O9sen/BEWrkWY/5FFBPs7nAZK5rJfv6+z7dV6g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=bgvSUHQYQwrwlui79N3aCdeMXP9T4mELtJLtmXuLLft4BK9plU0a0pOENYl7gINLM 0I1sjE4/MwKeykAi49b37fh3Z0mvBBwx1aX3JhZrjiRhXojeQ4F+WqAaVaQmJmVxRP jvkulUZistK5hawVSfMNqDv8+UkDwj+Be82VCgR4sUjC6lhQdCMCyucUUVjipaQ9O8 X8pq6v6Aat7iWWiA+5xberXkBtp3NDFiU9knuEcZ3s6/GqaOzB3riW8Csqnv6lUWLY US2h+YoQBrTRuaGFpYbRZZCJfP5TE/eCHpwkinS6V1tTafmDj1+NbBsx6LydU5yQjh wnG0HC40irdFQ== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6DE2D100048; Wed, 17 Apr 2024 13:45:53 -0400 (EDT) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5F5C81204F0; Wed, 17 Apr 2024 13:45:53 -0400 (EDT) From: Stefan Monnier To: Augusto Stoffel Subject: Re: bug#70137: 30.0.50; pp-macroexpand-last-sexp buffers should turn lexical binding on In-Reply-To: <87zftwcrvv.fsf@gmail.com> (Augusto Stoffel's message of "Sun, 14 Apr 2024 09:42:12 +0200") Message-ID: References: <87v8504829.fsf@gmail.com> <87zftwcrvv.fsf@gmail.com> Date: Wed, 17 Apr 2024 13:43:07 -0400 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-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.113 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70137 Cc: 70137@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 (---) > This would be the patch to propagate the lexical binding value. LGTM. Can you install it, or do you want me to do it? > (A less magical alternative I guess would be to just always set it to > t. Who needs to debug non-lexical code these days anyway?) Not sure why you think it'd be less magical. =F0=9F=99=82 > It doesn't cover the new `pp-insert-short-sexp'. Here again setting > lexical-binding=3Dt by default might be okay. `pp-insert-short-sexp` should use `lisp-data-mode` rather than `emacs-lisp-mode` anyway. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 17 14:55:28 2024 Received: (at 70137) by debbugs.gnu.org; 17 Apr 2024 18:55:29 +0000 Received: from localhost ([127.0.0.1]:47518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxARL-00076m-1Z for submit@debbugs.gnu.org; Wed, 17 Apr 2024 14:55:28 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]:53264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxARI-00075L-Db for 70137@debbugs.gnu.org; Wed, 17 Apr 2024 14:55:25 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2db2f6cb312so1812151fa.2 for <70137@debbugs.gnu.org>; Wed, 17 Apr 2024 11:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713380105; x=1713984905; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=NZRSG4P4+D5o4HD4UtkGwoQpGLqds+5mMABXfAKvInM=; b=ZbPSVrv8As5/GlmIMWcslC0TxP+HzXTc5EeDvt21GynmJpvSDymyPRuOgI7Fo94MrF OUv7KJV8Lq/g3Hg/IU7yt/xJFpqeghEh5NrHoErWnssIykHOfxS7G2O4ggrYhmKEZO+J EB7mU8Mw8hgjicfYKFBNX4vb/bcuf/SKKi9Ish7feOi5TshCaGn+uIxOb92L+W5nIvN2 44krwRRFQkzvvDtVnASkKLyVDzuugFfriZCCyQwJ11B+0TdlW7k/rXbPgK2fiEF+4ozG rrylViw7WfKheI+G0hWCk2eMMmVdRPCn1o721CKQ+kt5tjj1QeWLmc7KfWK5rEwoQ8dK FzWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713380105; x=1713984905; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NZRSG4P4+D5o4HD4UtkGwoQpGLqds+5mMABXfAKvInM=; b=eJ+yuPNs+k97rwWsRi2NjH1fBcnVj3ZVaRnF8GkBAnOQKHlWANFnjTTnqRA1p20uc9 1hx5bicsfXUPrWdnGNtKp+s5+Y2Zidk2il7KS8FPY+1DlHXCn7qb2/e9HsXttEA3Sb0H BrJzag8VC2vh49iWqEpkJBXgj40oJEfjHze9h1HOGYAglw5jRrpAQ1YBzcprBFuFyRvY BKhOoMMHFZC0HWOVyOhIvFCUYmZgWMlaZmu0Dweo/xY6T8LZ/KLfPMebuecv9x3XPIkZ zBeYlE+2+fy5J4x+GuFFyvqUrQ2TXZgFNV8Gl7VviGnLnK/Ut71kKYnAyGgIEgkZe1KJ wCqg== X-Gm-Message-State: AOJu0YxSG/pidqCgh6jZ5oFcmYj4rAc2YNDzLu/T5S7ljkLv7hgiWc/t 7K4xRO3N2LJ0o33uxP3P4RaCQG9mijt1xAzMaA4Rj2lDQExUQB14WZ5CqQ== X-Google-Smtp-Source: AGHT+IHcHYrHbekVCMBh0ox6zcoE43niKZ7d1KV9QhzEQ+exxFz6L5GpcjLqViN86cRLJYl/VRMs2g== X-Received: by 2002:a2e:868c:0:b0:2d8:d972:67e3 with SMTP id l12-20020a2e868c000000b002d8d97267e3mr147457lji.5.1713380104482; Wed, 17 Apr 2024 11:55:04 -0700 (PDT) Received: from ars3 ([2a02:8109:8a87:ff00::6223]) by smtp.gmail.com with ESMTPSA id gb25-20020a170907961900b00a522d34fee8sm7718084ejc.114.2024.04.17.11.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 11:55:04 -0700 (PDT) From: Augusto Stoffel To: Stefan Monnier Subject: Re: bug#70137: 30.0.50; pp-macroexpand-last-sexp buffers should turn lexical binding on In-Reply-To: (Stefan Monnier's message of "Wed, 17 Apr 2024 13:43:07 -0400") References: <87v8504829.fsf@gmail.com> <87zftwcrvv.fsf@gmail.com> Date: Wed, 17 Apr 2024 20:55:03 +0200 Message-ID: <878r1bizug.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70137 Cc: 70137@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: -1.0 (-) On Wed, 17 Apr 2024 at 13:43, Stefan Monnier wrote: > LGTM. Can you install it, or do you want me to do it? I don't have commit access to the repo and I absolutely don't mind the status quo :-). From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 17 17:06:22 2024 Received: (at 70137-done) by debbugs.gnu.org; 17 Apr 2024 21:06:22 +0000 Received: from localhost ([127.0.0.1]:48213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxCU1-00069d-26 for submit@debbugs.gnu.org; Wed, 17 Apr 2024 17:06:22 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxCTv-00069L-If for 70137-done@debbugs.gnu.org; Wed, 17 Apr 2024 17:06:18 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5EDFC444228; Wed, 17 Apr 2024 17:05:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1713387954; bh=qVdxKsi+umb817XnFBzu/rHK2eYtS+f6wwIL/qJbYdI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=MUo+TpT9yAV1FxXrNAzJWjbHKi8ZNUyUxNume0CdQD9/SYysm/+upFIyorSpyLwLV Vz5U10iYw2fr342HjBRoFRHGMCO2GfeLq6T+6gwgEoFKbMux+y0M4O+Ram6/nR6DGv cpPksfQl5Rwtdx6T6vSnhhQ/EIILmvK5EhM4rbMREUzLqfky+y7hGVd0QN5guEQgcl EVzxcpq5eBIis5mmkAdN5gmC8Rgi7u49i/4E9TV+7CfZkklromSB98lEJHXZJkZzzH 2R7R1nxuLoatlYBp3hTJfFfg3E7i3n+WieQ46p0eXBaWVQTRspDwxvVMqSG8276J43 Wy/bJZD62JOTw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4627A4417E1; Wed, 17 Apr 2024 17:05:54 -0400 (EDT) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 37D0F12046C; Wed, 17 Apr 2024 17:05:54 -0400 (EDT) From: Stefan Monnier To: Augusto Stoffel Subject: Re: bug#70137: 30.0.50; pp-macroexpand-last-sexp buffers should turn lexical binding on In-Reply-To: <878r1bizug.fsf@gmail.com> (Augusto Stoffel's message of "Wed, 17 Apr 2024 20:55:03 +0200") Message-ID: References: <87v8504829.fsf@gmail.com> <87zftwcrvv.fsf@gmail.com> <878r1bizug.fsf@gmail.com> Date: Wed, 17 Apr 2024 17:03:08 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.109 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70137-done Cc: 70137-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 (---) Thanks, pushed to `master`, closing, Stefan From unknown Sat Jun 21 10:43:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 16 May 2024 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator