branch: elpa/dracula-theme
commit 18816b98ed5d547acefc36a197e083c1dabe091d
Author: Sebastian Reuße <[email protected]>
Commit: Sebastian Reuße <[email protected]>
Fix non-graphical color switch
`(display-graphic-p)` will evaluate to nil when starting Emacs in daemon
mode.
Instead, we now use the attribute switch system provided by custom.el, which
apply definitions when a frame is created and will do the right thing when
running Emacs daemon.
Fixes #23
---
dracula-theme.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dracula-theme.el b/dracula-theme.el
index 66f3c5f..048e10a 100644
--- a/dracula-theme.el
+++ b/dracula-theme.el
@@ -18,13 +18,12 @@
(deftheme dracula)
-(if (display-graphic-p) (setq bg1 "#282a36") (setq bg1 "#000000"))
-
(let ((class '((class color) (min-colors 89)))
(fg1 "#f8f8f2")
(fg2 "#e2e2dc")
(fg3 "#ccccc7")
(fg4 "#b6b6b2")
+ (bg1 "#282a36")
(bg2 "#373844")
(bg3 "#464752")
(bg4 "#565761")
@@ -56,7 +55,8 @@
'dracula
;; default
`(cursor ((,class (:background ,fg3))))
- `(default ((,class (:background ,bg1 :foreground ,fg1))))
+ `(default ((((type nil)) (:background "#000000" :foreground ,fg1))
+ (,class (:background ,bg1 :foreground ,fg1))))
`(default-italic ((,class (:italic t))))
`(ffap ((,class (:foreground ,fg4))))
`(fringe ((,class (:background ,bg1 :foreground ,fg4))))