gpt4 book ai didi

emacs - elisp中如何确定操作系统?

转载 作者:行者123 更新时间:2023-12-03 05:09:22 25 4
gpt4 key购买 nike

如何以编程方式确定 ELisp 中运行 Emacs 的操作系统?

我想根据操作系统在 .emacs 中运行不同的代码。

最佳答案

系统类型变量:

system-type is a variable defined in `C source code'.
Its value is darwin

Documentation:
Value is symbol indicating type of operating system you are using.
Special values:
`gnu' compiled for a GNU Hurd system.
`gnu/linux' compiled for a GNU/Linux system.
`darwin' compiled for Darwin (GNU-Darwin, Mac OS X, ...).
`ms-dos' compiled as an MS-DOS application.
`windows-nt' compiled as a native W32 application.
`cygwin' compiled using the Cygwin library.
Anything else indicates some sort of Unix system.

关于emacs - elisp中如何确定操作系统?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1817257/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com