From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.devel Subject: Re: Should require and provide be symmetrical? Date: Wed, 10 Feb 2010 14:12:12 -0500 (EST) Message-ID: <20100210.141212.497990012.hanche@math.ntnu.no> References: <5e3a506e1002091729u3d70ed8bt2350c57b5d480f14@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1265829612 5409 80.91.229.12 (10 Feb 2010 19:20:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Feb 2010 19:20:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 10 20:20:10 2010 Return-path: Envelope-to: ged-emacs-devel@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 1NfI6b-0001BY-Ef for ged-emacs-devel@m.gmane.org; Wed, 10 Feb 2010 20:20:09 +0100 Original-Received: from localhost ([127.0.0.1]:46902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfI6a-0007nx-S5 for ged-emacs-devel@m.gmane.org; Wed, 10 Feb 2010 14:20:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfI5c-0007RI-Jn for emacs-devel@gnu.org; Wed, 10 Feb 2010 14:19:08 -0500 Original-Received: from [199.232.76.173] (port=55622 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfI5b-0007Qu-Pf for emacs-devel@gnu.org; Wed, 10 Feb 2010 14:19:07 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfI5T-0004Do-Rf for emacs-devel@gnu.org; Wed, 10 Feb 2010 14:19:06 -0500 Original-Received: from anne.math.ntnu.no ([129.241.15.150]:40414) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NfI5R-0004DG-Rs for emacs-devel@gnu.org; Wed, 10 Feb 2010 14:18:58 -0500 Original-Received: (qmail 1043 invoked from network); 10 Feb 2010 19:12:14 -0000 Original-Received: from gauss.math.ntnu.no (HELO localhost) (hanche@129.241.15.102) by anne.math.ntnu.no with ESMTPA; 10 Feb 2010 19:12:14 -0000 In-Reply-To: X-URL: http://www.math.ntnu.no/~hanche/ X-Mailer: Mew version 6.3.50 on Emacs 23.1.91 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:121055 Archived-At: + Andreas Schwab : > Nathaniel Flath writes: > > > I ran into this whil splitting up my personal configuration - I was > > attempting to mirror the packages I was loading, so for example org.el > > in my directory would contain customizations for org-mode. > > You can use eval-after-load for that. >From my .emacs (this is ancient code, not necessarily an example of good coding style): (setf HOME (expand-file-name "~hanche")) (setf my-libdir (concat HOME "/lib/emacs")) (push my-libdir load-path) (let ((fixes (mapcar #'(lambda (s) (cons (substring s 4 -3) (substring s 0 -3))) (directory-files my-libdir nil "^fix-.*[.]el$")))) (while fixes (let ((fix (first fixes))) (eval-after-load (car fix) (list 'load (cdr fix)))) (setf fixes (rest fixes)))) So, if there is a file named fix-org.el in my-libdir, the above will automatically do (eval-after-load "org" '(load "fix-org")). I use it more for bugfixes than customizations, but it has served me well over the years. - Harald