Next: Q3.0.2, Previous: Customisation, Up: Customisation
How can init.el determine which of the family of Emacsen I am using?
To determine if you are currently running GNU Emacs 18, GNU Emacs 19, XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the example given in etc/sample.init.el. There are other nifty things in there as well!
For all new code, you can use the variables running-xemacs
and
running-sxemacs
or something like
(when (featurep 'sxemacs) ...) (when (featurep 'xemacs) ...)
as well.
Please note, that you should double check these values, if you intend
to use xemacs-exclusive features. Both, the variable
running-xemacs
and the form (featurep 'xemacs)
evaluate
to t
within SXEmacs. This is due to compatibility reasons.