From: Harald Hanche-Olsen <hanche@math.ntnu.no>
To: emacs-devel@gnu.org
Subject: Re: Should require and provide be symmetrical?
Date: Wed, 10 Feb 2010 14:12:12 -0500 (EST) [thread overview]
Message-ID: <20100210.141212.497990012.hanche@math.ntnu.no> (raw)
In-Reply-To: <m27hqlq73h.fsf@igel.home>
+ Andreas Schwab <schwab@linux-m68k.org>:
> Nathaniel Flath <flat0103@gmail.com> 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
prev parent reply other threads:[~2010-02-10 19:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-10 1:29 Should require and provide be symmetrical? Nathaniel Flath
2010-02-10 2:44 ` chad
2010-02-10 2:48 ` Stephen J. Turnbull
2010-02-10 18:27 ` Andreas Schwab
2010-02-10 19:12 ` Harald Hanche-Olsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100210.141212.497990012.hanche@math.ntnu.no \
--to=hanche@math.ntnu.no \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).