From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: emacs-26: `with-eval-after-load' docstring omission Date: Wed, 28 Feb 2018 09:53:09 -0500 Message-ID: <4e07d7b4-f1f7-0d5d-5f2a-b5e491ab4303@gmail.com> References: <827ed6de-fd90-144e-53dd-50163a937b63@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1519829521 26449 195.159.176.226 (28 Feb 2018 14:52:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2018 14:52:01 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 28 15:51:57 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 1er35I-0006PW-G6 for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2018 15:51:56 +0100 Original-Received: from localhost ([::1]:44767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er37K-0004cI-TE for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2018 09:54:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er36X-0004ai-3q for emacs-devel@gnu.org; Wed, 28 Feb 2018 09:53:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er36W-0007OH-7s for emacs-devel@gnu.org; Wed, 28 Feb 2018 09:53:13 -0500 Original-Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:37104) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1er36W-0007Nr-2n for emacs-devel@gnu.org; Wed, 28 Feb 2018 09:53:12 -0500 Original-Received: by mail-qk0-x233.google.com with SMTP id y137so3285256qka.4 for ; Wed, 28 Feb 2018 06:53:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Ip5u0B+XJ2U+nVfIyj4Dz/PTKf8cSTQIOI7Y740jC/0=; b=tGQW1UTUtEWLIZ2HV02vssQwjq5JGg/mmSYgik2PRKwaCFR7vuIDiuSq0cfQfOcTdb liZYJAJx7clcZ/LUbRe2OkQl8FVRkWjCGQKr5UHZfPcdOv/amD5u7uCDwiVb8gVPArsS gNUKyOaonR/bOCpMBhvbRUOrynIApVjlq4wl+o6QUofW+bFQOp4MJfj363j3+ALRRCXZ dpc0YgaYqV5d1PMrGU7EBciO59kcu+fHGIHokKoTQDKDtXtZN5H7l+YkAfTTdlSYXj9g FqWkTBuE0+cSOhnqCdpAQIUVwvxPfw41/NzCqPOaAXpfAXElEo3j0AOcGHS/K4GaNA8Z IZxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ip5u0B+XJ2U+nVfIyj4Dz/PTKf8cSTQIOI7Y740jC/0=; b=FsPTZAghhYepVhAG0MDRvbPXR/oYjWcZmkPG/AydTFjNblpaB9F7LgJfseQzjGJ9Zf a68smHTAxx6KgfctT7F0ve2GSWRi/vuPraXFpcW8jv3oyjamUg5XOb+BbynlQzPRnYDV t4LpJ3NerkD7Rgs7AGn9XVdBxOcftURF9Rol+obMQINQci7AfwrIF1Sgd5ye5BaUnQjT JPccKM74h93E/4Cray3MO32sdW0i3aqQMO7u+xt3LdQCJM8GMUXCPlOpkRZudbnxNRzk tUBJ27haG/sQUTzfZlkpkbgWqzZa45wJkUmE0/6WxfHWTzS2KgwZup15xBzAMoUf3NFF p6mA== X-Gm-Message-State: APf1xPAvnFs0wCu/RRi9Kdvx1qv56K2oEU8bUp7MTh2PVHIODv+TmM3q 7dAEIvVIhljRGkvIPUAHICpNHhY5 X-Google-Smtp-Source: AG47ELthCHVYeaN0bkvSJb8GgwmLGNCI5m6zmiQutWUSVA+5vPae3ASJhBpy1+UEXowfYEUJkD9Ckw== X-Received: by 10.55.43.68 with SMTP id r65mr28893428qkh.117.1519829591333; Wed, 28 Feb 2018 06:53:11 -0800 (PST) Original-Received: from ?IPv6:2601:184:4180:66e7:3caa:840d:c217:daa5? ([2601:184:4180:66e7:3caa:840d:c217:daa5]) by smtp.gmail.com with ESMTPSA id t16sm1273686qtj.37.2018.02.28.06.53.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 06:53:10 -0800 (PST) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::233 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:223167 Archived-At: On 2018-02-27 15:58, Stefan Monnier wrote: > > (defun FUN () EXP) > (eval-after-load FILE '(FUN)) > ≠ > (eval-after-load FILE 'EXP) > > [ Well, of course, this equivalence is actually true as well given the > current compiler-macro, but I'm assuming above that we undo this > compiler macro. ] > > IOW, the behavior you seem to want is semantically a good bit more messy. Is that because macroexpansion happens eagerly in the body of the defun, too? I guess I just don't expect that to happen unless the file is byte-compiled, really :/ > In your case, you do want the quote because you need to delay > macro-expansion, but I think it's cleaner to solve this problem by > *explicitly* using a quote, rather than by relying on the messy > semantics of the macro/function you happen to be using. I'm not sure I follow: doesn't the compiler macro mean that even explicitly using a quote isn't enough? > E.g. your exact same problem could show up if you used, say, > (add-hook 'flycheck-mode-hook ...) > instead of > (with-eval-after-load ...) > but you wouldn't ask for a change in add-hook to "solve" your problem. Would the problem there be that the body of the lambda I'd pass to add-hook would be eagerly macro-expanded? I think the big difference between these two is that I expect `with-eval-after-load` to really behave differently, and the reason for expecting that is that we don't otherwise have a convenient way to delay macroexpansion and execution of a form until a file is loaded, right? Maybe we need a `with-macroexp-and-eval-after-load`? Clément.