From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Vicente Vera Newsgroups: gmane.emacs.devel Subject: Re: emacs-26: `with-eval-after-load' docstring omission Date: Sun, 4 Mar 2018 16:04:44 +0000 Message-ID: References: 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 1520179375 31829 195.159.176.226 (4 Mar 2018 16:02:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Mar 2018 16:02:55 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 04 17:02:51 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 1esW64-0007DK-8w for ged-emacs-devel@m.gmane.org; Sun, 04 Mar 2018 17:02:48 +0100 Original-Received: from localhost ([::1]:45312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esW85-0005kz-9P for ged-emacs-devel@m.gmane.org; Sun, 04 Mar 2018 11:04:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esW7z-0005kt-5v for emacs-devel@gnu.org; Sun, 04 Mar 2018 11:04:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esW7y-0000FI-88 for emacs-devel@gnu.org; Sun, 04 Mar 2018 11:04:47 -0500 Original-Received: from mail-oi0-x234.google.com ([2607:f8b0:4003:c06::234]:45569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esW7y-0000Ev-30 for emacs-devel@gnu.org; Sun, 04 Mar 2018 11:04:46 -0500 Original-Received: by mail-oi0-x234.google.com with SMTP id j79so10350937oib.12 for ; Sun, 04 Mar 2018 08:04:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=E92Z3CzlKVSVHrNmu8wP0rq14fBy+AZl57HtQXJVDHA=; b=VU1q+mZmhX1v5nHre8Q5Dh3OFS6VBojUCsDyHqRAUNU9og6hbAUPCGWYTkF1hCRcxh eFM+bGo99QD4SK4UF//USISrqPmaLGDA1lPgqY9F5aVN39p2Cp51c9JsFjfx3Xfh/3j3 CT5bhpN/0VlI1Fnfa1e1ZmE08dTp4HNYmVv7J5h4rvQgUv+aFOi9/PJEE4Oq7G1iLdkL zMk/wH6FN4xHqZLvMg3d6Qvj7MeolTDEZ0DtQCwaZNjHWMXqlSRipNCtEf4H1BuZJop5 t+WPYimWeUS7YvX1h/Oam9BK1i6VdK98JNmqhn/xLvmRUTIrnAPg/UdVKtpllsSIY1Ze Za0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=E92Z3CzlKVSVHrNmu8wP0rq14fBy+AZl57HtQXJVDHA=; b=o6WM4Nf6ov/J6SY45ZddM+JefLJ7fLkI8SDNKavP20ppXrStgqhozTWxAyxk5yopCW WzVAQkdQNfSb60HfCAWLhcdda3uGy0VY78BDII4wlnFGSooAQDwR/duKPvuWF7BoOX+2 UBfEyaHVlZmw+8SpogYE5qO5l5K7huxqYzZ+ZE3TiIHyF7mTlbGegKD9849AbceLcC7o CCoyMwesb7BR1F92482ootmIJT5LQzs+5rH3hsWbQ157f0E0FfAC7yXYyCvfvrygtUBJ cUiuCPnR+/ZsGeZ0AtnFnWVtx6HqAjkcnWaKsPScwVoeXeKNwaLVjixFklxTzcCc4uAT wYTQ== X-Gm-Message-State: AElRT7GicOD4gixN7i7N/bIA++onmnFmRfzijug8l7bff8LFxaZNVkag YC9zcthy3D2ETiKdlLyRxkoFedoMoDBhVbnq+XU= X-Google-Smtp-Source: AG47ELsq5tT8geZJvV5ywom6kJlE3vwkSSJFRqpb3MghXf0aiNWR/uibELnWSdu3fIdRnSzXqRCYjcdB7VJ/sflgwYY= X-Received: by 10.202.102.227 with SMTP id m96mr7424438oik.178.1520179484527; Sun, 04 Mar 2018 08:04:44 -0800 (PST) Original-Received: by 10.157.66.170 with HTTP; Sun, 4 Mar 2018 08:04:44 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::234 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:223260 Archived-At: =E2=80=9CHmm. eval-after-load doesn't pass forms through eval, actually, AFAICT (it uses a lambda, just like with-eval-after-load)=E2=80=9D =E2=80=9CThe whole point of with-eval-after-load is that it doesn't do the "double evaluation" of eval-after-load (which was a frequent source of errors/confusion).=E2=80=9D Indeed. So the difference between the two is: - =E2=80=98with-eval-after-load=E2=80=99 calls =E2=80=98eval-after-load=E2= =80=99 to run BODY as a function. Conveniently, there's no need to quote nor wrap expressions in a lambda form. - =E2=80=98eval-after-load=E2=80=99 runs FORM as a function in both cases: = if FORM is a function or a quoted expression. The latter is the "double evaluation" case: =E2=80=98eval-after-load=E2=80=99 is called twice to wr= ap FORM as a function. Still, an elaboration on the behavior of =E2=80=98with-eval-after-load=E2= =80=99 could be useful. Something like: "BODY will be called as a function with no arguments through =E2=80=98funcall=E2=80=99." (as per =E2=80=98eval-after-l= oad=E2=80=99 docstring). And probably an addition to the last paragraph: "See =E2=80=98eval-after-load=E2=80=99 for more details about... and how BODY wi= ll be evaluated.". 2018-03-03 15:06 GMT+00:00 Vicente Vera : > (In reply to Stefan.) > > No, there is no specific issue involved. Just some harmless and > temporary confusion, that's all. > > After reading =E2=80=98with-eval-after-load=E2=80=99 docstring (which jus= t says > "Execute BODY after FILE is loaded.") I expected that BODY would be > executed just like in =E2=80=98eval-after-load=E2=80=99, which by default= passes forms > to =E2=80=98eval=E2=80=99. > > My argument is that there are implicit behaviours that *might* lead to > wrong assumptions. In my case, I had to look at =E2=80=98with-eval-after-= load=E2=80=99 > code and re-read =E2=80=98eval-after-load=E2=80=99 docstring to clearly u= nderstand the > differences. > > > 2018-02-23 13:42 GMT+00:00 Vicente Vera : >> Hello. >> >> Currently, =E2=80=98with-eval-after-load=E2=80=99 docstring doesn't ment= ion that BODY >> is executed as a lambda expression through funcall. The docstrings >> refers to =E2=80=98eval-after-load=E2=80=99 regarding the FILE argument,= but not how >> BODY is executed.