From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29679: 26.0.90; :after-hook not compiled Date: Fri, 15 Dec 2017 12:34:11 +0200 Message-ID: <837etoth3w.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1513334122 15444 195.159.176.226 (15 Dec 2017 10:35:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 15 Dec 2017 10:35:22 +0000 (UTC) Cc: acm@muc.de, 29679@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 15 11:35:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePnKn-0003aJ-ES for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Dec 2017 11:35:17 +0100 Original-Received: from localhost ([::1]:45550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePnKr-0002zX-Fo for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Dec 2017 05:35:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePnKd-0002wK-9m for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 05:35:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePnKY-0006cm-Pk for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 05:35:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54251) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePnKY-0006cR-Mi for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 05:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ePnKY-0004a9-GR for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 05:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Dec 2017 10:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29679 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29679-submit@debbugs.gnu.org id=B29679.151333407017562 (code B ref 29679); Fri, 15 Dec 2017 10:35:02 +0000 Original-Received: (at 29679) by debbugs.gnu.org; 15 Dec 2017 10:34:30 +0000 Original-Received: from localhost ([127.0.0.1]:34698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePnK1-0004ZC-TM for submit@debbugs.gnu.org; Fri, 15 Dec 2017 05:34:30 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePnK0-0004Z0-Po for 29679@debbugs.gnu.org; Fri, 15 Dec 2017 05:34:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePnJu-00068H-Ed for 29679@debbugs.gnu.org; Fri, 15 Dec 2017 05:34:23 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePnJk-00062m-Ga; Fri, 15 Dec 2017 05:34:12 -0500 Original-Received: from [176.228.60.248] (port=4609 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ePnJj-00008s-Vg; Fri, 15 Dec 2017 05:34:12 -0500 In-reply-to: (message from Stefan Monnier on Tue, 12 Dec 2017 15:07:24 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141110 Archived-At: > From: Stefan Monnier > Date: Tue, 12 Dec 2017 15:07:24 -0500 > Cc: Alan Mackenzie > > I just realized that the :after-hook option of define-derived-mode (new > in Emacs-26) is expanded in a way that introduces some problems. > More specifically a > > :after-hook (foo bar) > > gets turned into something like > > (push '(foo bar) 'delayed-after-hook-forms) > > which means that the code (foo bar) is not byte-compiled, hence is not > macro-expanded, and will be evaluated later via `eval` without paying > attention to the setting of `lexical-binding`. > > It's not a very serious problem in practice, but if we keep the code as > we have it, it means that code byte-compiled with Emacs-26 will use the > above > > (push '(foo bar) 'delayed-after-hook-forms) > > in its .elc and we'll have to preserve backward compatibility with it. > So it'd be better to fix it before Emacs-26 is released. > Here's a minimal patch for it, which I hope is safe enough for emacs-26. > > OK to push to emacs-26? LGTM, thanks. Alan, do you agree?