From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Re: autoload Date: Mon, 24 Jan 2011 14:38:29 +0200 Message-ID: References: <62BD90AE-3E99-4357-9048-5F58A2FD358B@easesoftware.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1295875251 24478 80.91.229.12 (24 Jan 2011 13:20:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 Jan 2011 13:20:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 24 14:20:47 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PhMLa-0005LY-QM for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Jan 2011 14:20:43 +0100 Original-Received: from localhost ([127.0.0.1]:33233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhLjV-0004oK-FH for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Jan 2011 07:41:21 -0500 Original-Received: from [140.186.70.92] (port=41153 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhLh1-0003h4-6n for help-gnu-emacs@gnu.org; Mon, 24 Jan 2011 07:38:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhLgy-00009A-JB for help-gnu-emacs@gnu.org; Mon, 24 Jan 2011 07:38:45 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:41715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhLgy-00008t-C7 for help-gnu-emacs@gnu.org; Mon, 24 Jan 2011 07:38:44 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PhLgv-00040f-FG for help-gnu-emacs@gnu.org; Mon, 24 Jan 2011 13:38:41 +0100 Original-Received: from 91.193.68.214 ([91.193.68.214]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 24 Jan 2011 13:38:41 +0100 Original-Received: from gavenko by 91.193.68.214 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 24 Jan 2011 13:38:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 91.193.68.214 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 In-Reply-To: <62BD90AE-3E99-4357-9048-5F58A2FD358B@easesoftware.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-Spam-Report: 5.4 points; * -0.0 SPF_PASS SPF: sender matches SPF record * 4.0 RCVD_NUMERIC_HELO Received: contains an IP address used for HELO * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * 4.0 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL * [91.193.68.214 listed in zen.spamhaus.org] Xref: news.gmane.org gmane.emacs.help:78704 Archived-At: On 24.01.2011 2:40, Perry Smith wrote: > I have a .emacs.d directory with various elisp files I've either written myself over the years or pulled down from the net. > > I just spent the past few hours constructing various scripts to automatically byte compile the new files and also create a myautoloads.el file that I load at startup. It just seems to me that I must be recreating the wheel. > > What do others do? > I store all my *.el files under DVCS (Mercurial) and install it from Makefile. From '.emacs': (defvar my-lisp-dir (expand-file-name "~/.emacs.d/my-lisp") "Here live my lisp packages.") (add-to-list 'load-path my-lisp-dir t) (defvar my-autoload (concat my-lisp-dir "/autoload-my.el") "Path to autoload for mode files.") (if (file-exists-p my-autoload) (load my-autoload)) From 'Makefile': FILES_MODE_EL := $(wildcard *-mode.el) .PHONY: install install: .emacs $(FILES_MODE_EL) cp .emacs $(HOME)/.emacs rm -f -r $(HOME)/.emacs.d/my-lisp mkdir -p $(HOME)/.emacs.d/my-lisp for file in $(FILES_MODE_EL); do \ cp -f $$file $(HOME)/.emacs.d/my-lisp; \ done $(EMACS) --batch \ --eval='(let ( (generated-autoload-file "~/.emacs.d/my-lisp/autoload-my.el") ) (update-directory-autoloads "~/.emacs.d/my-lisp") )' Look at last Makefile command - it generate autoload file automatically. Compilation I don't use as my *-mode.el files are very short.