开发者

Emacs: check for no-window-system in .emacs

开发者 https://www.devze.com 2023-01-18 22:46 出处:网络
is it possible, to check if开发者_开发知识库 emacs is running in --no-window-system (-nw) mode within the dot-emacs file (.emacs)? I would like to enable/include certain extension only if emacs is in

is it possible, to check if开发者_开发知识库 emacs is running in --no-window-system (-nw) mode within the dot-emacs file (.emacs)? I would like to enable/include certain extension only if emacs is in window mode (/or not).

Kind regards, mefiX


The variable window-system is nil if the selected frame is on a text-only terminal.


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 i.e.

(when (display-graphic-p)
  (do something)
  (do-another-thing))

or reverse

0

精彩评论

暂无评论...
验证码 换一张
取 消