From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.help Subject: Re: autoload Date: Sun, 23 Jan 2011 22:49:13 -0600 Message-ID: <065C351A-6288-4442-831F-327DD8525288@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1295844602 20998 80.91.229.12 (24 Jan 2011 04:50:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 Jan 2011 04:50:02 +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 05:49:54 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 1PhENC-00018r-BS for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Jan 2011 05:49:50 +0100 Original-Received: from localhost ([127.0.0.1]:43629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhEN9-0002MN-Ps for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Jan 2011 23:49:47 -0500 Original-Received: from [140.186.70.92] (port=46699 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhEMg-0002M3-3J for help-gnu-emacs@gnu.org; Sun, 23 Jan 2011 23:49:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhEMe-00013h-Rq for help-gnu-emacs@gnu.org; Sun, 23 Jan 2011 23:49:17 -0500 Original-Received: from mail-qy0-f169.google.com ([209.85.216.169]:34381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhEMe-00013a-Nb for help-gnu-emacs@gnu.org; Sun, 23 Jan 2011 23:49:16 -0500 Original-Received: by qyk7 with SMTP id 7so2430671qyk.0 for ; Sun, 23 Jan 2011 20:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=BM4Iat8PvDQhdLQEaflrOVeX3XuAncBNTnoRofNN2ZE=; b=nY1JfQBy+mqSGxn5KqcrfKqREKEZCUx3ibgZ8mdB2iyHs0ZnNoajl+/oEaGLoK0GvR O0G6dFgB8JUC8Z8WEQFjP+bK7//m1Gr47y7/U5unZap3LEIuc6EZVhajSRLLLaycL3r4 gQeR1SR5ucnUtqdtMmBVfSzd2rG7ODOuVc4P0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=fDpJhCdnZMkee/pDBHdRtreS3UW5fSKciMzc0lP4DZiatp1ZRCHSKUJuYHvsn03RRV r28nJBxSIiuOKIxjZ7vozBF3n6dBP5QGuvpoJgvd+WvtWkIekB4edt1Q3si5cfVUbeyj JNXBzuCMizL9UEpJtgCaip0PjT4MTPTVsLBR0= Original-Received: by 10.224.74.82 with SMTP id t18mr3751257qaj.105.1295844555981; Sun, 23 Jan 2011 20:49:15 -0800 (PST) Original-Received: from [10.0.0.2] ([64.128.19.234]) by mx.google.com with ESMTPS id s10sm8978711qco.35.2011.01.23.20.49.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 23 Jan 2011 20:49:15 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1082) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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 Xref: news.gmane.org gmane.emacs.help:78694 Archived-At: On Jan 23, 2011, at 10:09 PM, Stefan Monnier wrote: >> I just spent the past few hours constructing various scripts to >> automatically byte compile the new files >=20 > As in byte-recompile-directory? Roughtly. but batch-byte-recompile-directory does not create the elc if = it doesn't already exist unless you wrap it. So I wrote: (defun batch-byte-recompile-directory-all () (batch-byte-recompile-directory 0)) >=20 >> and also create a myautoloads.el file that I load at startup. >=20 > As in update-directory-autoloads? Again... roughly but you have to wrap it so that the autoloads go to a = local file: (defun batch-update-my-autoloads (&optional file) (defvar command-line-args-left) ;Avoid 'free variable' warning (let ((generated-autoload-file "~/.emacs.d/pedz/myloaddefs.el") (temp command-line-args-left)) (while temp (update-file-autoloads (car temp)) (setq temp (cdr temp))) (save-some-buffers t))) Oh... And update-directory-autoloads doesn't walk down the tree... Its not a lot of work but it just seemed like I can't be the only person = doing this. I coupled it with a script: #!/bin/sh # # Script to run after doing a git pull # # Emacs is taken as /Applications/Emacs.app/Contents/MacOS/Emacs if it # exists (a Mac platform), otherwise, we just use emacs. if [[ -x /Applications/Emacs.app/Contents/MacOS/Emacs ]] ; then EMACS=3D/Applications/Emacs.app/Contents/MacOS/Emacs else EMACS=3Demacs fi # First, make all the .elc files: ${EMACS} -batch -l batch-commands.el -f = batch-byte-recompile-directory-all # Now, update the myloaddefs.el file: find . -type f -name '*.el' -print | \ egrep -v '/\.git' | \ xargs egrep -l '# *autoload' | \ xargs ${EMACS} \ -batch \ -l batch-commands.el \ -f batch-update-my-autoloads # We don't want myloaddefs.el compiled because it confuses me. rm -f pedz/myloadsdefs.elc pedz