From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.devel Subject: when to call provide, first or last? Date: Mon, 27 Feb 2012 20:47:49 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0444040a9b098604b9f184a0 X-Trace: dough.gmane.org 1330346885 21372 80.91.229.3 (27 Feb 2012 12:48:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2012 12:48:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 27 13:48:04 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S1zzn-0007SA-OQ for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 13:48:03 +0100 Original-Received: from localhost ([::1]:51859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1zzm-0000LI-QE for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 07:48:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1zzh-0000L5-5J for emacs-devel@gnu.org; Mon, 27 Feb 2012 07:48:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1zzb-00055i-Bn for emacs-devel@gnu.org; Mon, 27 Feb 2012 07:47:57 -0500 Original-Received: from mail-we0-f169.google.com ([74.125.82.169]:55009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1zzb-00055a-4s for emacs-devel@gnu.org; Mon, 27 Feb 2012 07:47:51 -0500 Original-Received: by werj55 with SMTP id j55so566258wer.0 for ; Mon, 27 Feb 2012 04:47:49 -0800 (PST) Received-SPF: pass (google.com: domain of l26wang@gmail.com designates 10.180.82.227 as permitted sender) client-ip=10.180.82.227; Authentication-Results: mr.google.com; spf=pass (google.com: domain of l26wang@gmail.com designates 10.180.82.227 as permitted sender) smtp.mail=l26wang@gmail.com; dkim=pass header.i=l26wang@gmail.com Original-Received: from mr.google.com ([10.180.82.227]) by 10.180.82.227 with SMTP id l3mr27803874wiy.1.1330346869973 (num_hops = 1); Mon, 27 Feb 2012 04:47:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=Y52SyGMAZRa86kWHoU59eWta7cVtRS+uHURE3j3j3Io=; b=Z4kszla9DGaqyFOf+Az7Icx00F3RtsPi/tivaUDnQaz7KUKn+/PLlAEH4lRjgsMDFC dbR8CxXNgHFEeO3zxQFT6yxPtbdSaseS/y6fP+D6FWewkPcLbe5pzGLhIGDqthSeslq6 Qyrf7jVJINEcgCKWNAJVLJbV0Ym/EfzdRlNxc= Original-Received: by 10.180.82.227 with SMTP id l3mr22086943wiy.1.1330346869852; Mon, 27 Feb 2012 04:47:49 -0800 (PST) Original-Received: by 10.216.29.130 with HTTP; Mon, 27 Feb 2012 04:47:49 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148808 Archived-At: --f46d0444040a9b098604b9f184a0 Content-Type: text/plain; charset=ISO-8859-1 Hi, What's the accepted idiom for calling (provide 'foo-feature)? I picked up the habit of calling it first in every library I write. This way two libraries can call functions from each other without causing a circular dependency. But I had a look through lisp/*.el and everything calls provide last. Is there some disadvantage to calling it first that I'm not seeing? -- Le --f46d0444040a9b098604b9f184a0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

What's the accepted idiom for calling (provide 'foo-feat= ure)?=A0 I picked up the habit of calling it first in every library I write= .=A0 This way two libraries can call functions from each other without caus= ing a circular dependency.

But I had a look through lisp/*.el and everything calls provide last.= =A0 Is there some disadvantage to calling it first that I'm not seeing?=

--
Le
--f46d0444040a9b098604b9f184a0--