From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#39373: 27.0.50; [PATCH] mode-local-print-bindings broken with lexical-binding Date: Sat, 1 Feb 2020 22:40:16 +0100 Message-ID: References: <495920D0-A298-43BF-99E6-B5ADA06113CB@acm.org> <83lfpnjuiz.fsf@gnu.org> <928DB820-6899-4653-8872-82CE3CF567CD@acm.org> <83imkrjrvh.fsf@gnu.org> <8EF7D3C6-041D-493F-859B-55D8D35AF588@acm.org> <83eevekat8.fsf@gnu.org> <3FB58E0B-E1DB-4709-98AB-92A45508486A@acm.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121468"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39373@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 01 22:42:12 2020 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 1iy0Wp-000VUT-Ve for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Feb 2020 22:42:11 +0100 Original-Received: from localhost ([::1]:50948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iy0Wp-0005J0-1w for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Feb 2020 16:42:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59745) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iy0Wh-0005Ii-8i for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2020 16:42:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iy0Wg-00011K-8n for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2020 16:42:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33423) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iy0Wf-00010w-U2 for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2020 16:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iy0Wf-00019V-Ri for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2020 16:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Feb 2020 21:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 39373-submit@debbugs.gnu.org id=B39373.15805933114412 (code B ref 39373); Sat, 01 Feb 2020 21:42:01 +0000 Original-Received: (at 39373) by debbugs.gnu.org; 1 Feb 2020 21:41:51 +0000 Original-Received: from localhost ([127.0.0.1]:39396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iy0WU-000196-Q7 for submit@debbugs.gnu.org; Sat, 01 Feb 2020 16:41:51 -0500 Original-Received: from mail1445c50.megamailservers.eu ([91.136.14.45]:57940 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iy0WS-00018s-Ii for 39373@debbugs.gnu.org; Sat, 01 Feb 2020 16:41:49 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1580593301; bh=YdN7edUSqFU1Yo1WVj1sIVo+4y/jghkd6/pgskPj/DY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=hs0+h0LgjvA/NnZ7MQ4PCiTTi19Q7qHqZHII5TRcVttmrmIEGDHc0E+pZzmgVWcnx UTcx7bEyxu/z/VDwsWdoT6yd56DJ7sr2IyxbCuXTcVMha7XAgUqv+v9V9BSUPwjNET nRP65/AsCZ4s4oGyUdnkQJUklpktteQRvRVIJ1oM= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 011Lfb1F014723; Sat, 1 Feb 2020 21:41:39 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0209.5E35F095.0002, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=YIzhNiOx c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=Y5VFf0hPGQ8sVX9UeX4A:9 a=CjuIK1q_8ugA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:175572 Archived-At: 1 feb. 2020 kl. 21.15 skrev Stefan Monnier : > Compiler macros work when the code passes through `macroexpand-all`, = so > it works when the code is compiled as well as when it's `load`ed = (thanks > to "eager" macroexpansion), but not when it's passed directly to = `eval`. Understood, thank you. (Obviously they aren't expanded when the function = is called indirectly, but I didn't find anyone doing that with = add-to-list.) > The message is supposed not to trigger when it's applied to = dynamically > scoped var, but it's probably not 100% reliable. It appears that the warning triggers (as a hard error, actually) when = add-to-list is called directly from a function, but not if it only = occurs inside a lambda. All the cases found were inside lambdas (or they = would have been fixed long ago). > BTW, this problem doesn't affect only `add-to-list`. Other culprits > include `add-hook`, `run-hooks`, `set`, and `symbol-value`. Right. I see that some of them are detected by the compiler (in = byte-compile-form), but add-to-list is commented out. The set of functions is a bit open-ended; there is also = add-to-ordered-list, add-to-history, etc. Not sure how much text needs = to be added for all these. There is a general note about lexical = variables and symbol values in the manual, in the section about lexical = binding. > LGTM, Thanks, pushed to emacs-27.