From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Newsgroups: gmane.emacs.help Subject: Re: Circular dependencies between libraries - what to do? Date: Mon, 6 Oct 2014 18:30:11 +0200 Message-ID: References: <87mw9ukm2b.fsf@debian.uxu> <87iok5gomg.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1412613074 19333 80.91.229.3 (6 Oct 2014 16:31:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Oct 2014 16:31:14 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 06 18:31:09 2014 Return-path: Envelope-to: geh-help-gnu-emacs@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 1XbBBi-0001oh-04 for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Oct 2014 18:31:06 +0200 Original-Received: from localhost ([::1]:52993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbBBh-0000fR-In for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Oct 2014 12:31:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbBAx-0000Gk-9s for help-gnu-emacs@gnu.org; Mon, 06 Oct 2014 12:30:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbBAr-0004bU-Of for help-gnu-emacs@gnu.org; Mon, 06 Oct 2014 12:30:19 -0400 Original-Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:50860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbBAr-0004ai-7P for help-gnu-emacs@gnu.org; Mon, 06 Oct 2014 12:30:13 -0400 Original-Received: by mail-la0-f48.google.com with SMTP id gi9so4772323lab.35 for ; Mon, 06 Oct 2014 09:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HlhRSeCXYEGjB8HK4opRi2axxIySJSbYxgrOf6YMarA=; b=Yjh7SlOCZVEH/+SixCh12tNYXQPyfMSITDY3bxuYgaP0UJw2N93m5OMyOWaakbhAQ5 fnyBsqhe0j3sRUJBcT1DFVKVBvqaIrbgrNLYJKm3kxQgcbQylh7PVI9NHqvWCytqhVP/ E8tno79hzkCQzafvZE6NbYGjqYXE3cyPQ5o8q7uROXGVv3Ge8vLukRumf7/QOWRfDudI ZuQG4mUgDkeE9U3YoF+UB5Ome/V5bL2xPNmIIt9IlSaeqV/QvwgIxA8QWjnmZtcd2ygg +psa0jRGbdIaSUFKXwhvqwrxoxCtE/BVfeOfrneN5Dje4ctHgwbw9IilDdMPUuxzQROV PSPw== X-Received: by 10.112.65.5 with SMTP id t5mr6168572lbs.82.1412613011272; Mon, 06 Oct 2014 09:30:11 -0700 (PDT) Original-Received: by 10.114.77.131 with HTTP; Mon, 6 Oct 2014 09:30:11 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: awn88MmE2_8TtjyDwJbFOkJ3nFQ X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::230 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100311 Archived-At: I was reading the `provide' source code in the context of my dynamic loading branch [1] and it reminded me of this thread. On Tue, Sep 30, 2014 at 9:05 PM, Stefan Monnier wrote: >> Interesting. Is this considered 'acceptable' coding style in the Emacs >> world? > > It's discouraged, although it is used by some packages included in > Emacs, IIRC. The `provide' call is usually placed at the end of the file because `provide' also evaluates loading hooks (`eval-after-load' code). If you place it at the start of the file, loading hooks will potentially use undefined functions/vars despite being in the file. 1: code https://github.com/aaptel/emacs-dynamic-module issues/roadmap https://github.com/aaptel/emacs-dynamic-module/issues