From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Levin Du" Newsgroups: gmane.emacs.devel Subject: Re: Feature Request : autoload-form Date: Mon, 31 Mar 2008 15:58:21 +0800 Message-ID: <9649271a0803310058h77051b26n61c980ad23806e03@mail.gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4755_16276663.1206950301177" X-Trace: ger.gmane.org 1206950336 13769 80.91.229.12 (31 Mar 2008 07:58:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Mar 2008 07:58:56 +0000 (UTC) Cc: emacs-devel@gnu.org, Stefan Monnier , rms@gnu.org To: "paul r" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 31 09:59:27 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JgEvL-00009U-Cg for ged-emacs-devel@m.gmane.org; Mon, 31 Mar 2008 09:59:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JgEuj-0008Hh-K1 for ged-emacs-devel@m.gmane.org; Mon, 31 Mar 2008 03:58:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JgEuR-0008AP-NT for emacs-devel@gnu.org; Mon, 31 Mar 2008 03:58:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JgEuQ-00089N-Mf for emacs-devel@gnu.org; Mon, 31 Mar 2008 03:58:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JgEuP-00089J-Po for emacs-devel@gnu.org; Mon, 31 Mar 2008 03:58:25 -0400 Original-Received: from ti-out-0910.google.com ([209.85.142.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JgEuO-0005QT-Mp for emacs-devel@gnu.org; Mon, 31 Mar 2008 03:58:25 -0400 Original-Received: by ti-out-0910.google.com with SMTP id a20so369481tia.10 for ; Mon, 31 Mar 2008 00:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=Wl30jlmH5qVzszy9rYyysfA2Hgzk0q9cqnyCHYpAi00=; b=cJ3P95MIqMViB8Pb3zGHLIG1V6Flnf6JgDDHRByi7EjunaEM2dDLcj7OVEA24u9BOdY0QaAhhV5tr700OxY8bdP6P/n5YbfWXSazu1USud9uZ583hlw8FQ3bAyTgNZU5OyxgZltE497GkDyw2+yZ9okwjwDUkjJd0krMggmJxrY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=V8B8/WxkGsJiJBrsBwjPbt2yTiDXc29gPd3m+6P0EV7Srxke/Xyi96lMpnhlR1wd/r9UP+0dNAQ67tDgJC47gWMLO/zfUGqAXeSuFNF0z4Q5vHHbs8LQaGleKxNCW1q6At1MlirrQD8HghlH5srEKgfEKNXwtTSLZGTCrvh2NOY= Original-Received: by 10.110.90.9 with SMTP id n9mr141748tib.40.1206950301168; Mon, 31 Mar 2008 00:58:21 -0700 (PDT) Original-Received: by 10.110.53.20 with HTTP; Mon, 31 Mar 2008 00:58:21 -0700 (PDT) In-Reply-To: X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94025 Archived-At: ------=_Part_4755_16276663.1206950301177 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline We currenly have (eval-after-load file form), what about: (eval-before-load file form) to make things easier? 2008/3/31, paul r : > > 2008/3/30, Stefan Monnier : > > > I think of autoload as a particular case of the general need to > > > "eval-on-event-then-call". Therefore, I do not see why evaluating a > > > form is less simple than loading a file. Form evaluation is, indeed, > > > less limited but I don't see why it should be a disadvantage here. > > > > > > By the way, instead of > > > > (autoload ) > > > > you can do > > > > (defun (&rest args) > > > > > > (apply args)) > > > > I needed to do a macro for that, because name is known at > runtime, but at the end it works. > Thank you. -- Levin ------=_Part_4755_16276663.1206950301177 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
We currenly have (eval-after-load file form), what about:
 
   (eval-before-load file form)
 
to make things easier?

 
2008/3/31, paul r <paul.r.ml@gmail.com>:
2008/3/30, Stefan Monnier <monnier@iro.umontreal.ca>:
> > I think of autoload as a particular case of the general need to
>  > "eval-on-event-then-call". Therefore, I do not see why evaluating a
>  > form is less simple than loading a file. Form evaluation is, indeed,
>  > less limited but I don't see why it should be a disadvantage here.
>
>
> By the way, instead of
>
>   (autoload <fun> <exp> <doc>)
>
>  you can do
>
>   (defun <fun> (&rest args)
>     <doc>
>     <exp>
>     (apply <fun> args))
>

I needed to do a macro for that, because <fun> name is known at
runtime, but at the end it works.
Thank you.
 
--
Levin

 
------=_Part_4755_16276663.1206950301177--