From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Newsgroups: gmane.emacs.devel Subject: module documentation draft Date: Mon, 24 Apr 2017 19:04:25 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a114c66e87e2edc054dec998f X-Trace: blaine.gmane.org 1493053475 15287 195.159.176.226 (24 Apr 2017 17:04:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Apr 2017 17:04:35 +0000 (UTC) To: Philipp Stephani , Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 24 19:04:32 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2hPa-0003qC-5X for ged-emacs-devel@m.gmane.org; Mon, 24 Apr 2017 19:04:30 +0200 Original-Received: from localhost ([::1]:45179 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2hPf-0002im-RP for ged-emacs-devel@m.gmane.org; Mon, 24 Apr 2017 13:04:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2hPY-0002iQ-K7 for emacs-devel@gnu.org; Mon, 24 Apr 2017 13:04:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2hPX-0005GB-PV for emacs-devel@gnu.org; Mon, 24 Apr 2017 13:04:28 -0400 Original-Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]:35133) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d2hPX-0005Fw-Gu for emacs-devel@gnu.org; Mon, 24 Apr 2017 13:04:27 -0400 Original-Received: by mail-pf0-x22e.google.com with SMTP id v14so11521941pfd.2 for ; Mon, 24 Apr 2017 10:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=v3bWCR55XzRvfs/Pq+UgUO/5i0EfriNpDjMjyLhfYxg=; b=fU+PsN5LlaNeG+AhI92+/cTQNyjmlvQeU0tmGfxjpnS0wYOx6o8kvB640e69dUZgeU dG0dMvU3SsUcl1LZMx6Ygfbx5jP7+Lun+molgq50/3U0JWLaLO8EjHmD/7UxW5IdDLDH jwBW1sF9cm7DYxaw+ZU41+clP4n5WBjqTrjj+ptnjtEpZqfwfdoJjiZJKkvFKE+n63ZX 7la4cIgIL7AYsAMgU+Mq+XDwZPx2j+kdxHH006b3LumfEYw9KB5Dr8zamK8BaWzQydp6 yVdJd6CDYqR75JOnMPYNsOMuBdOHXFdtJzxTRwJgO7fuF2eJ6dXenpPxga6uc3kyMTHq xqEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=v3bWCR55XzRvfs/Pq+UgUO/5i0EfriNpDjMjyLhfYxg=; b=steqreNQ6OOnYnllW0Olbu3cUoG15CWHmqYt9XyPSJqCHdP25rMG8dkgYu7xnL8GF5 VrOxS4B9HtOWGc3S61IML5LYM2eIa0QgqWKXHZ8AxRf/7SldN436a90hGdJSOBWie1EQ UrJ1TWklLaRh66qAdejQCfCKYhnoHj4zFsv3y0GJBn85hGwBIHXPluLLzZFJHbIFk5nH UOYHQvTXb9ozvbecValPwJ2nw+fyKzwndvUZnYV0H7jrvZHUIZPpEjc9TrIuNW/FEeU/ wZdXSt82fm8K4EjUEAA6IicCH3bIvW/pa2yyjtoClpr5kPB392LVAVVF1J/mkWnd9uDz jjDQ== X-Gm-Message-State: AN3rC/4HJpA7KdVafs1LsGouozWHK/fAjGpIwklFUzpfwIO/Y4q4ET7+ zo9TQqFtKEVVanw8hFSq8EB34a56wf01 X-Received: by 10.99.168.77 with SMTP id i13mr25613695pgp.148.1493053466347; Mon, 24 Apr 2017 10:04:26 -0700 (PDT) Original-Received: by 10.100.187.69 with HTTP; Mon, 24 Apr 2017 10:04:25 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:214262 Archived-At: --001a114c66e87e2edc054dec998f Content-Type: text/plain; charset=UTF-8 Hi, ~6 months ago I started writing some doc for modules. Some things have changed since then it seems (Philipp last message about make_global_ref seems to mention something I thought was removed.. hrm..) But it could be a good starting point. Look for XXX. --001a114c66e87e2edc054dec998f Content-Type: application/vnd.lotus-organizer; name="modules.org" Content-Disposition: attachment; filename="modules.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j1wdgjc50 IytUSVRMRTogVXNpbmcgYW5kIGRlZmluaW5nIG1vZHVsZXMKClRoaXMgY2hhcHRlciBkZXNjcmli ZXMgaG93IHRvIGV4dGVuZCBHTlUgRW1hY3MgZHluYW1pY2FsbHkgd2l0aApuYXRpdmVseSBjb21w aWxlZCBjb2RlLCBhcyBvcHBvc2VkIHRvIGxvYWRpbmcgRW1hY3MgTGlzcCBvcgpieXRlLWNvbXBp bGVkIEVtYWNzIExpc3AgY29kZS4KCiogVXNhZ2UKClN0YXJ0aW5nIHdpdGggdmVyc2lvbiAyNSwg R05VIEVtYWNzIGluY2x1ZGVzIHN1cHBvcnQgZm9yIGxvYWRpbmcKZHluYW1pYyBtb2R1bGVzLiBU aGlzIGZ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