From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: when to call provide, first or last? Date: Mon, 27 Feb 2012 13:59:05 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1330347600 26404 80.91.229.3 (27 Feb 2012 13:00:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2012 13:00:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Le Wang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 27 13:59:59 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 1S20BH-0005Ac-Vh for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 13:59:56 +0100 Original-Received: from localhost ([::1]:33160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S20BH-0004p9-M4 for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 07:59:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S20BE-0004ok-TM for emacs-devel@gnu.org; Mon, 27 Feb 2012 07:59:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S20B9-000704-5C for emacs-devel@gnu.org; Mon, 27 Feb 2012 07:59:52 -0500 Original-Received: from mail-pz0-f41.google.com ([209.85.210.41]:65067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S20B8-0006zv-U8 for emacs-devel@gnu.org; Mon, 27 Feb 2012 07:59:47 -0500 Original-Received: by dadv6 with SMTP id v6so5262795dad.0 for ; Mon, 27 Feb 2012 04:59:45 -0800 (PST) Received-SPF: pass (google.com: domain of lekktu@gmail.com designates 10.68.193.136 as permitted sender) client-ip=10.68.193.136; Authentication-Results: mr.google.com; spf=pass (google.com: domain of lekktu@gmail.com designates 10.68.193.136 as permitted sender) smtp.mail=lekktu@gmail.com; dkim=pass header.i=lekktu@gmail.com Original-Received: from mr.google.com ([10.68.193.136]) by 10.68.193.136 with SMTP id ho8mr39874174pbc.148.1330347585472 (num_hops = 1); Mon, 27 Feb 2012 04:59:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=vjuGaQs387qU6Y9YhWmjEXCk+KjotODR2JA9EJ0qLO8=; b=E5N+qlTAVoGknIRzuxhs+BcrNMTuJgZIF4srFtozekxx7NG3exVPQN8FU/+MHxIH15 E8BIGIBz8epEohwfTu5Re4c+V4bCGUwv5faWoRm8pFUuzJKh6SsqAV+QUKpyopkGFgxA vkrpAJQ9AZmjtq/KUm/zmPsGXU54Q7Su/0hzs= Original-Received: by 10.68.193.136 with SMTP id ho8mr34004863pbc.148.1330347585207; Mon, 27 Feb 2012 04:59:45 -0800 (PST) Original-Received: by 10.142.241.5 with HTTP; Mon, 27 Feb 2012 04:59:05 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.41 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:148809 Archived-At: On Mon, Feb 27, 2012 at 13:47, Le Wang wrote: > Is there some disadvantage to calling it first that I'm not seeing? Try loading this file my-feature.el: ;;; starts here (provide 'my-feature) ) (defun my-function () "") ;;; ends here with emacs -Q -l my-feature.el, and you'll get: load-with-code-conversion: Invalid read syntax: ")" (featurep 'my-feature) =3D> t (fboundp 'my-function) =3D> nil In other words, having `provide' at the end guarantees that the feature does not enter the feature list unless the file was correctly loaded. =C2=A0 =C2=A0 Juanma