I need to have different setup in .emacs depending on my system (Mac or PC).
This post teaches how to know the system that my emacs is running.
- How can I check the variable ‘system-type’ is to set what in emacs?
- What code should I have in .emacs to have different setup for PC and Mac?
??? (when (eq system-type 'windows-nt') )
You can do this:
What I do in my .emacs is set a variable (I call it this-config) based on machine type and name. Then I use the same .emacs everywhere.
Using this code, I can pull the machine name out:
You can then set this-config based on system-type and/or machine name.
Then I use this code:
Edit:
system-typereturns a symbol, not a string