coexisting emacs and xemacs init files

146 Views Asked by At

I have both xemacs and emacs installed on computers. Some run windows XP or Win7, and some run linux. This if for code migration and for code testing.

They keep reading each other's init files. Both programs are being extra-helpful and finding multiple names, and looking in multiple places, but they mirror each other and load each other's init files anyway.

There are posts about this, but the answers lean towards a common init file with 'if' statements to load things that are different. I want separate initialization files entirely.

If I set a 'HOME' environment variable in Windows, they both look there. If there is a .emacs file in C:\ on Windows, they both load that file.

Ideally, is there a command line argument to load a specific init file? I know there is one to prevent loading any init file...

Failing that, is there a way to put the init files in different directories and have them each only look there? How do I program each where to look?

The same problem exists when you have 2 different versions of emacs on the same computer. but want them to each load their own init file.

Any ideas?

1

There are 1 best solutions below

0
On

taking from jpkotta's answer:

put in your .emacs file the following:

(cond ((featurep 'xemacs)
load-file my_xemacs_init
)
(t
load-file my_emacs_init
))