On Thu, 21 Apr 2005 21:38:52 -0400 [EMAIL PROTECTED] 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 _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs