emacs - set cursor color only for graphic mode
authorPeng Li <seudut@gmail.com>
Sat, 5 Nov 2016 17:38:54 +0000 (01:38 +0800)
committerPeng Li <seudut@gmail.com>
Sat, 5 Nov 2016 17:38:54 +0000 (01:38 +0800)
emacs.d/config.org

index bd6cf01..fb86b1d 100644 (file)
@@ -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]]