I have two Emacs (Aquamacs and text-based Emacs) on my Mac.
In my .emacs file, I can check if I\'m using Aquamacs with ...
.emacs
(boundp \'aquamacs-
Errr... (not (boundp 'aquamacs-version)), perhaps?
(not (boundp 'aquamacs-version))