Fixes #50 compatibility for emacs with no graphical support
Resolves #194 Warning if a build has no graphical support
This commit is contained in:
parent
d0c33564c7
commit
3f997db88d
2 changed files with 16 additions and 6 deletions
|
@ -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
|
||||||
|
(when window-system
|
||||||
|
;; those unless tests are for the case when the user has a ~/.emacs file
|
||||||
|
;; were he/she ;; removes the GUI elements
|
||||||
(unless (eq tool-bar-mode -1)
|
(unless (eq tool-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1))
|
||||||
(when (not (eq window-system 'mac))
|
(unless (eq scroll-bar-mode -1)
|
||||||
|
(scroll-bar-mode -1)))
|
||||||
|
(unless (eq window-system 'mac)
|
||||||
(menu-bar-mode -1))
|
(menu-bar-mode -1))
|
||||||
(scroll-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"))
|
||||||
|
|
|
@ -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
|
||||||
|
|
Reference in a new issue