emacs - set cursor color only for graphic mode
[dotfiles.git] / emacs.d / config.org
index 9c47a64..fb86b1d 100644 (file)
@@ -38,7 +38,7 @@ Set system PATH and emacs exec path
       (menu-bar-mode 1)
     (menu-bar-mode 0))
 
-  ;; (setq debug-on-error t)
+  (setq debug-on-error t)
   (setq inhibit-startup-message t)
 
   (defalias 'yes-or-no-p 'y-or-n-p)
@@ -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]]