emacs - fix issue on termianl, check the graphic mode.
authorPeng Li <seudut@gmail.com>
Sun, 19 Feb 2017 09:56:46 +0000 (17:56 +0800)
committerPeng Li <seudut@gmail.com>
Sun, 19 Feb 2017 09:56:46 +0000 (17:56 +0800)
emacs.d/config.org

index 25136a4..7460b77 100644 (file)
@@ -31,12 +31,15 @@ Set system PATH and emacs exec path
 ** General Setting
 *** scroll bar, tool-bar and menu-bar
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
-  (scroll-bar-mode 0)
-  (tool-bar-mode 0)
+  (if (display-graphic-p)
+      (progn
+        (scroll-bar-mode 0)
+        (tool-bar-mode 0)
+        (menu-bar-mode 1)))
 
-  (if window-system
-      (menu-bar-mode 1)
-    (menu-bar-mode 0))
+  ;; (if window-system
+  ;;     (menu-bar-mode 1)
+  ;;   (menu-bar-mode 0))
 
   (setq debug-on-error t)
   (setq inhibit-startup-message t)