linux - 如何检查 Xorg 是否在 emacs lisp 中运行?

标签 linux emacs lisp elisp xorg

我的配置中有一些东西只能在 Xorg 中工作,否则会出错。

要解决这个问题,我需要知道 Xorg 是否正在运行。我该如何检查?

(defun nCdy-mode ()
    ;; TOOD: Add Xorg check
    ;(tool-bar-mode nil)
    (menu-bar-mode nil) ; TODO: Add hotkey
    ;(scroll-bar-mode nil)
    (setq inhibit-splash-screen t)

    (setq standard-indent 4)
    ;;(mouse-wheel-mode t)
    (setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))

    ;;TODO: Add Xorg check
    ;(require 'nyan-mode)
    ;(nyan-mode)
    ;(nyan-start-animation)
    ;;nyanyanyanyanyanyanyanyanyanyan

谢谢

最佳答案

(case window-system
  (x '"X11 running")
  (otherwise "No X11"))

关于linux - 如何检查 Xorg 是否在 emacs lisp 中运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8643436/

相关文章:

lambda - 用 lisp 代码编写的 Lambda 微积分无穷大骑士

json - 使用 drakma :http-request 发布 JSON 数据

linux - Bash 脚本适用于 ssh,但不适用于 php

c - 编译 linux 内核时无法识别 list_head

debugging - Emacs中如何实现错误回溯?

macos - 如何将 emacs 颜色从常规终端保留到 gnu screen

lisp - 可互换的条件

linux - 如何编辑 FreeBSD .gz 引导文件?

python - 在 Python 中检查 Linux 上的 USB 驱动器?

java - 如何在 emacs 中运行 Java 代码?