Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing for platform in elisp?

Tags:

emacs

elisp

I'm sharing my emacs configuration files between a linux box and an OS X box. The config breaks however when I define a specific font for Emacs.app in the config which is then not available on linux.

Is there a way I can test for the current platform and then execute or skip the OS X specific instructions?

like image 674
Phillip B Oldham Avatar asked Nov 05 '09 09:11

Phillip B Oldham


1 Answers

The elisp variable system-type is what you want. So you can write

(if (eq system-type 'darwin)
    (your-macosx-specific-configuration))
like image 52
Laurynas Biveinis Avatar answered Nov 15 '22 10:11

Laurynas Biveinis