unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Keep a dir at the top of load-path??
@ 2005-04-22  1:38 ned
  0 siblings, 0 replies; 2+ messages in thread
From: ned @ 2005-04-22  1:38 UTC (permalink / raw)



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.

Does that make sense?
-- 
Ned Ludd

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Keep a dir at the top of load-path??
       [not found] <mailman.2515.1114134355.2895.help-gnu-emacs@gnu.org>
@ 2005-04-22  2:01 ` David Hansen
  0 siblings, 0 replies; 2+ messages in thread
From: David Hansen @ 2005-04-22  2:01 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-22  2:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-22  1:38 Keep a dir at the top of load-path?? ned
     [not found] <mailman.2515.1114134355.2895.help-gnu-emacs@gnu.org>
2005-04-22  2:01 ` David Hansen

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).