From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: A combination of defmacro, functionp, and quoted lambdas yields different results on consecutive evaluations Date: Wed, 28 Feb 2018 13:44:49 +0100 Message-ID: <87tvu1nv0e.fsf@web.de> References: <08190786-14de-a899-f591-a7043c87bebb@gmail.com> <9dbc26f4-e86f-c3df-8193-61a0a3837466@gmail.com> <10414fb8-e09c-a4fa-dcd1-5ccfff10650d@gmail.com> <555f3f1b-d31f-ec12-e460-8b0c20816d45@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1519821833 26790 195.159.176.226 (28 Feb 2018 12:43:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2018 12:43:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 28 13:43:49 2018 Return-path: Envelope-to: ged-emacs-devel@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 1er15J-0006KR-6A for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2018 13:43:49 +0100 Original-Received: from localhost ([::1]:43781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er17K-000311-1H for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2018 07:45:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er16T-0002x2-4l for emacs-devel@gnu.org; Wed, 28 Feb 2018 07:45:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er16Q-0006gi-26 for emacs-devel@gnu.org; Wed, 28 Feb 2018 07:45:01 -0500 Original-Received: from mout.web.de ([212.227.17.11]:32769) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1er16P-0006gA-OE for emacs-devel@gnu.org; Wed, 28 Feb 2018 07:44:57 -0500 Original-Received: from drachen.dragon ([188.99.169.170]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M09hY-1eaSBr1uf6-00uF6y; Wed, 28 Feb 2018 13:44:51 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 27 Feb 2018 16:35:12 -0500") X-Provags-ID: V03:K0:hXkEhQQk/iZQy2Ygnuir9dUNxpR0OyN5xDpko52aFNYbETKTpvG Mal3EqiPFwg5T80vNwFQOUjQt8Rk5Uq5f63TfXPb6Zqkybv4ZZsc3lNnitybtSpMi/xcsZS mJ3LRM8lhhxU9fTHL4xqBzHsyySSM7YbvuiqVTn3g4O/fTrTxzqgh2tfZDAgCZk5zhBXAex 93c0tUjIB0NiIJlFQ6hCA== X-UI-Out-Filterresults: notjunk:1;V01:K0:+AnpEQ5gkzM=:0CreFs7LdhG/2geUSZSYPD G6iVA5g07u4hdymUR8Y8Q/JdPA5wZy1Lv66kelfOwZchTWyxsXlXBQzdJO5kFOxiZi0qd5JCa oCPcX0y5z9IyWSM0uh27e3pxpHQV9Y6xsGNAB8zRjE5cgvt0tHbI4uodY5o0Fgxn6dvClUt86 VtYu0HKY4SBbL6qoRUHN9UbOT72tuOciX6ZpE9R9d4BmIzTjiTUiTng3s63ryPZ4kdm+/Y2iX z1eDY3eCSSrrrTGnMAD57JLXSIhunIUd++7MPDdE0O5lqKS+fN7xxKCMTiu+WRPn4RTALC1+J XN6PzGftjQUoi9RgMvaYXGMnxT9DhmXju+pBnmGISDtjxkG1TWtsQGyPc3RFUU7w13BTbOQSs etBJ1eyFLCPTXkinBNBg52nr7cdILt+SxA5ZFHT10lRpBUKaslxxl7r1IJFdmaW0onq28XkPp Rb+RmpHGXYngaKjjM0YqQx920gHkPNo/aA1B58uV9iYhglOb348rM3KO+9wyusAFzjXh67pZ1 Y4ExiXFWLnl8lL19tV06MKXx3wbNmWk9w2UuMZPnqTdJMGytieEB7MYu3Y6K/9+/9jvSIJofi D79NwVWHreri7xpplzHpKsHNGGy0nB6R46mwf4XkbU9XBLnqtJe4ILiO1LXEuRkhX7U7jvYg9 l4fnqz3L93WgYk7o+Ur/tqWKl7yhIVScnOaT4DaEGPY2jFHW/+u/nZGPK9Xm0NjsEDRsaxEyO 5ZPiFrHrmVm9SuKSaX+OWjEcX+BONpAt/B1x73VTZBhpbnMhwxSLk//rgtHsuhfbnpCLN0A2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.11 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223163 Archived-At: Stefan Monnier writes: > Another option, is to compile that file and then you can do > > (eval-when-compile (require 'flycheck)) > (with-eval-after-load 'flycheck > (flycheck-define-checker > =E2=80=A6)) > > it also works if you don't byte-compile, except that the > with-eval-after-load becomes ineffective. So that's not really an option. I fear that this problem, although there are acceptable workarounds, could be a regularly recurring issue. It's not an unnatural expectation that code in `eval-when-compile' is allowed to use all of the stuff defined in the FILE. People use this in their init files, not all will know about the underlying mechanisms, so this is not really optimal. Would it make sense to introduce an optional argument for `eval-after-load' that, when non-nil, arranges that the FORM is untouched until the FILE is loaded, and then compiled and loaded?=20=20 A disadvantage would be that compiling the init file would not warn any more about problems in the specified FORM. Michael.