How to determine operating system in elisp?

前端 未结 7 800
一个人的身影
一个人的身影 2021-01-30 19:22

How do I programmatically determine which OS Emacs is running under in ELisp?

I would like to run different code in .emacs depending on the OS.

7条回答
  •  心在旅途
    2021-01-30 20:00

    For folks newer to elisp, a sample usage:

    (if (eq system-type 'darwin)
      ; something for OS X if true
      ; optional something if not
    )
    

提交回复
热议问题