From 113fd12750a3fd88c8573d76d8eaaea4dec122c3 Mon Sep 17 00:00:00 2001 From: Peng Li Date: Sun, 6 Nov 2016 01:38:54 +0800 Subject: [PATCH] emacs - set cursor color only for graphic mode --- emacs.d/config.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/emacs.d/config.org b/emacs.d/config.org index bd6cf01..fb86b1d 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -406,7 +406,8 @@ Enable rainbow mode in emacs lisp mode ** cusor color #+BEGIN_SRC emacs-lisp :tangle yes :results silent - (set-cursor-color 'red) + (if (display-graphic-p) + (set-cursor-color 'red)) #+END_SRC * Mode-line @@ -3413,3 +3414,7 @@ search music on some music web site ** Need separate the Key-bindings and package-initialization + +** Check if emacs is in terminal of graphic mode +Use =display-graphic-p= instead of =window-system= +[[info:elisp#Window%20Systems][Window Systems]] -- 2.11.0