I use two emacs (Aquamcs and text based emacs) on my Mac.
I normally use text based emacs for just editing something, so I don’t want to load anything with it.
What I came up with is to have the checking code in .emacs to exit/break if it’s text based emacs (darwin system but not aquamacs).
(when (and (equal system-type 'darwin) (not (boundp 'aquamacs-version)))
(exit) ??? (break) ????
)
It seems to work, but I don’t know how to break out of .emacs. How to do that?
ADDED
I just wanted to speed up in loading text based emacs on my mac, and I thought about breaking out as a solution. Based on the helpful answers, I came up with the following code that runs .emacs only when it’s not a text based emacs.
(setq inhibit-splash-screen t)
(unless (null window-system)
I don’t know of any way to do exactly what you want. Some workarounds:
You can stop the evaluation of your
.emacsby evaluating(error "message")but that’s a bit unpleasant.You can re-order your .emacs so that there’s a
(unless (CONDITION) ...)around the whole of the file.You can run
emacs -Q FILEwhen you’re at the command line.Why do you want to do this? Are you concerned at the time it takes to load your
.emacs? If so, you might consider using the Emacs client/server instead.