在elisp中测试平台?

Phi*_*ham 6 emacs elisp

我在linux盒子和OS X盒子之间共享我的emacs配置文件.但是,当我在配置中为Emacs.app定义特定字体时,配置会中断,然后在linux上不可用.

有没有办法可以测试当前平台然后执行或跳过OS X特定指令?

Lau*_*nis 8

elisp变量系统类型是你想要的.所以你可以写

(if (eq system-type 'darwin)
    (your-macosx-specific-configuration))
Run Code Online (Sandbox Code Playgroud)