[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Keep a dir at the top of load-path??
From: |
David Hansen |
Subject: |
Re: Keep a dir at the top of load-path?? |
Date: |
Fri, 22 Apr 2005 04:01:57 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
On Thu, 21 Apr 2005 21:38:52 -0400 ned@hermans.net wrote:
> I have built a handy .emacs that lets me run either Emacs or
> XEmacs depending on my mood.
>
> The only problem is that I want to byte-compile my various .els
> with one or the other. I want to specify an Emacs byte-compile
> destination and an XEmacs destination and have them be called
> first from the load-path.
>
> So the question is how to keep an entry as the first entry in
> load-path no matter what gets added subsequently.
Maybe not quite what you want but does this help?
(defmacro dh-when-xemacs (&rest forms) ;; (declare (indent 0))
(when (featurep 'xemacs) (cons 'progn forms)))
(defmacro dh-when-gnu-emacs (&rest forms) ;; (declare (indent 0))
(unless (featurep 'xemacs) (cons 'progn forms)))
(defvar dh-elisp-dir
(concat "~/.elisp/"
(dh-when-xemacs "xemacs/")
(dh-when-gnu-emacs "emacs/")
"/"))
(dolist (path (list dh-elisp-dir
(concat dh-elisp-dir "maxima/")
(concat dh-elisp-dir "http-emacs/")
(concat dh-elisp-dir "slime/")
(concat dh-elisp-dir "bbdb/lisp/")
(concat dh-elisp-dir "erc/")))
(dh-add-path path 'load-path))
David