开发者

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)? 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜