[英]Emacs: check for no-window-system in .emacs
is it possible, to check if emacs is running in --no-window-system
( -nw
) mode within the dot-emacs file ( .emacs
)? 是否可以检查emacs是否在dot-emacs文件(
.emacs
)中以--no-window-system
( -nw
)模式运行? I would like to enable/include certain extension only if emacs is in window mode (/or not). 我想仅在emacs处于窗口模式(/或不是)时才启用/包含某些扩展。
Kind regards, mefiX 亲切的问候,mefiX
如果所选帧位于纯文本终端上,则变量window-system
nil
。
Put the code you want to run when emacs executes in a windowed environment inside a when block and use the display-graphic-p predicate ie 将emacs在when块中的窗口环境中执行时,运行要运行的代码,并使用display-graphic-p谓词,即
(when (display-graphic-p)
(do something)
(do-another-thing))
or reverse 或者反转
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.