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: Fri, 9 Mar 2018 00:47:01 +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 1520556547 28061 195.159.176.226 (9 Mar 2018 00:49:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2018 00:49:07 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 09 01:49:03 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 1eu6DV-000779-9Z for ged-emacs-devel@m.gmane.org; Fri, 09 Mar 2018 01:49:01 +0100 Original-Received: from localhost ([::1]:42662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu6FY-0001mm-3J for ged-emacs-devel@m.gmane.org; Thu, 08 Mar 2018 19:51:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu6Bd-00085q-3T for emacs-devel@gnu.org; Thu, 08 Mar 2018 19:47:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eu6Bc-0006Xh-9J for emacs-devel@gnu.org; Thu, 08 Mar 2018 19:47:05 -0500 Original-Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:46383) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eu6Bc-0006UQ-1F for emacs-devel@gnu.org; Thu, 08 Mar 2018 19:47:04 -0500 Original-Received: by mail-oi0-x230.google.com with SMTP id x12so5797627oie.13 for ; Thu, 08 Mar 2018 16:47:03 -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=DmGF3fZdJmxrhD6efwDtr6ypiTPA1ggz8DQtKIhrL7k=; b=F8NIglU3JyItqYauqTpdhevkx/Xb/6o3qZDwrFSBzCpQAkRJCWrzcVwL5Yj49xETZ3 87CwPIG1OVJiM/5ffILRFlTPdd1PSTbBRFTUp98PETcJMfG99uAMbug06fEmvF5IbfaR IbEwE4gszgQiR4ehZr1O8a1cJm6IR8ZiDhLwcUVloAbcNC1k04YqAx/D2HUYgPsGHcCP B4UcDRPSQ5qeAZsXmrKFjKAFsJCh4M03h0B4BV2rSt4sgbN+7YO2iPRMKZQN5fhnzPjg Rxl8t0CSeHAb4hoJHHpzD97tCubSm+VTWiQpwLOD1bY6O1QcXbtBEqzVIE+En/3RI4BA 1rLg== 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=DmGF3fZdJmxrhD6efwDtr6ypiTPA1ggz8DQtKIhrL7k=; b=F5WerloMHMrd5sgVl4bH0wXd/fZG9x9rR3650kwcstV+1Mu0RgPx26INIXPIf93OEA cP1Tdefl8ezFvpdeJu9ImF2P1/ukfYLl6JzJ77rHzm0+KKFAHYV0nc1GbPns9HNNmOub zgp1Yf37PYYza3x7CGdnZWABVAVPvlK85XuhiG1yolQHZ/Eh+RKuiHRvDFcTnzXamBIF E+AZRnuYBS1/aUzO+bP8oQNhut9v9+c+/ULsbvuOevkj8Giw7eKmEGC10ef3YzyzbvyV DBuG37VxsPDdGdb9AN6BqfsbYbAibg6iH8GodyeR7eTrFPUAxK8Naloq0W3HUBIyEQRp jzHQ== X-Gm-Message-State: AElRT7EQ5nLYnhnh2L72gZtUmA5Ixcf47gQ+IXJ8fc4hzfmXkLitwHd4 Gh3AU+Maimzqc0/64fRHXr+mH8gEXLbr3SCuzvI= X-Google-Smtp-Source: AG47ELvQI85ph8Wc0iwrvBGQT4XuaFuVOYX+HDoB2ASJ+c8qQuf5/tFhg3Sutwl6gTPHmRVTzjmPVo2sr9N2s4jW8Eg= X-Received: by 10.202.65.132 with SMTP id o126mr16687961oia.88.1520556422451; Thu, 08 Mar 2018 16:47:02 -0800 (PST) Original-Received: by 10.157.66.170 with HTTP; Thu, 8 Mar 2018 16:47:01 -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::230 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:223522 Archived-At: Hmm, I see. I'm sorry for the noise. Also, from what's been said here, the internal behavior of both functions is broadly equivalent? 2018-03-04 16:04 GMT+00:00 Vicente Vera : > =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 th= e > "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 = wrap 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= -load=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 = will 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 ju= st 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 defaul= t 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 = understand 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 men= tion 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.