Fixes #50 compatibility for emacs with no graphical support

Resolves #194 Warning if a build has no graphical support
This commit is contained in:
syl20bnr 2015-01-07 00:04:47 -05:00
parent d0c33564c7
commit 3f997db88d
2 changed files with 16 additions and 6 deletions

View file

@ -89,12 +89,21 @@
(spacemacs/load-or-install-package (intern pkg)))))) (spacemacs/load-or-install-package (intern pkg))))))
(load-theme dotspacemacs-default-theme t) (load-theme dotspacemacs-default-theme t)
(setq-default spacemacs-cur-theme dotspacemacs-default-theme) (setq-default spacemacs-cur-theme dotspacemacs-default-theme)
;; remove GUI elements ;; remove GUI elements if supported
(unless (eq tool-bar-mode -1) (when window-system
(tool-bar-mode -1) ;; those unless tests are for the case when the user has a ~/.emacs file
(when (not (eq window-system 'mac)) ;; were he/she ;; removes the GUI elements
(menu-bar-mode -1)) (unless (eq tool-bar-mode -1)
(scroll-bar-mode -1)) (tool-bar-mode -1))
(unless (eq scroll-bar-mode -1)
(scroll-bar-mode -1)))
(unless (eq window-system 'mac)
(menu-bar-mode -1))
;; for convenience and user support
(unless (boundp 'tool-bar-mode)
(spacemacs/message (concat "No graphical support detected, you won't be"
"able to launch a graphical instance of Emacs"
"with this build.")))
;; font ;; font
;; Dynamic font size depending on the system ;; Dynamic font size depending on the system
(let ((font "Source Code Pro")) (let ((font "Source Code Pro"))

View file

@ -2009,6 +2009,7 @@ determine the state to enable when escaping from the insert state.")
(defun spacemacs/init-vi-tilde-fringe () (defun spacemacs/init-vi-tilde-fringe ()
(use-package vi-tilde-fringe (use-package vi-tilde-fringe
:if window-system
:init :init
(global-vi-tilde-fringe-mode) (global-vi-tilde-fringe-mode)
:config :config