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

标签 emacs elisp

如何以编程方式确定 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/

相关文章:

macos - 如何在 MacOS Catalina 上安装 X11 版本的 Emacs?

macos - <tab> v. Emacs 中的 TAB

emacs - 在 Emacs 中重载键绑定(bind)

Emacs Lisp : How to sum odd numbers in a list?

emacs - 组织捕获和计时不当行为

emacs gdb tab-completes 目录用空格而不是/

emacs - 如何将函数作为参数传递给elisp?

emacs - 使用字符串列表中指定的符号名称附加列表

emacs - 组织模式 : how to filter the blocks to be tangle?

emacs - 如何在新框架中运行 gdb-many-windows?