From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: when to call provide, first or last? Date: Mon, 27 Feb 2012 06:05:46 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1330351586 26211 80.91.229.3 (27 Feb 2012 14:06:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2012 14:06:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Le Wang'" , "'Juanma Barranquero'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 27 15:06:25 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 1S21DX-0008Tu-TR for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 15:06:20 +0100 Original-Received: from localhost ([::1]:57894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S21DX-0005P6-2h for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 09:06:19 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S21DN-0005NL-Mz for emacs-devel@gnu.org; Mon, 27 Feb 2012 09:06:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S21DH-0002MO-Pn for emacs-devel@gnu.org; Mon, 27 Feb 2012 09:06:09 -0500 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:27529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S21DH-0002Lu-Jo for emacs-devel@gnu.org; Mon, 27 Feb 2012 09:06:03 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q1RE5wwK015864 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Feb 2012 14:05:59 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q1RE5wgi001598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 27 Feb 2012 14:05:58 GMT Original-Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q1RE5wlQ008498; Mon, 27 Feb 2012 08:05:58 -0600 Original-Received: from dradamslap1 (/10.159.34.90) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 27 Feb 2012 06:05:58 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Acz1V8v5XAKEVkwaRhy8aMSh6tpTMQAAG29A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4F4B8DC7.013E,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 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:148819 Archived-At: > I'm just trying to clarify what the idiomatic way to use it is. Put it last, EXCEPT for this situation described in section `(elisp) Named Features': "Although top-level calls to `require' are evaluated during byte compilation, `provide' calls are not. Therefore, you can ensure that a file of definitions is loaded before it is byte-compiled by including a `provide' followed by a `require' for the same feature, as in the following example. (provide 'my-feature) ; Ignored by byte compiler, ; evaluated by `load'. (require 'my-feature) ; Evaluated by byte compiler. The compiler ignores the `provide', then processes the `require' by loading the file in question. Loading the file does execute the `provide' call, so the subsequent `require' call does nothing when the file is loaded." > Maybe a summary of this discussion should be in the manual? Consider filing a doc bug, after you've reread pertinent parts of the manual and are still convinced that improvement is in order.