emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/realgud f884fe7 003/140: Simplify and perhaps generaliz


From: Rocky Bernstein
Subject: [elpa] externals/realgud f884fe7 003/140: Simplify and perhaps generalize
Date: Sat, 25 May 2019 19:35:19 -0400 (EDT)

branch: externals/realgud
commit f884fe71bf0c1c8190279751c8b7d8c657770095
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Simplify and perhaps generalize
---
 realgud/common/fringe.el | 66 +++++++++++++++---------------------------------
 1 file changed, 21 insertions(+), 45 deletions(-)

diff --git a/realgud/common/fringe.el b/realgud/common/fringe.el
index c50153b..f974e28 100644
--- a/realgud/common/fringe.el
+++ b/realgud/common/fringe.el
@@ -29,51 +29,27 @@
 
 ;; FIXME: Figure out how to do this as a macro.
 
-(if (equal 'dark (frame-parameter nil 'background-mode))
-    (progn
-      (defface realgud-overlay-arrow1
-       '((t
-          :foreground "green"
-          :weight bold))
-       "Fringe face for current position."
-       :group 'realgud)
-
-      (defface realgud-overlay-arrow2
-       '((t
-          :foreground "white"
-          :weight bold))
-       "Fringe face for position one back in fringe."
-       :group 'realgud)
-
-      (defface realgud-overlay-arrow3
-       '((t
-          :foreground "gray"
-          :weight bold))
-       "Fringe face for position two back in fringe."
-       :group 'realgud)
-      )
-  ;; else
-  (progn
-    (defface realgud-overlay-arrow1
-      '((t
-        :foreground "black"
-        :weight bold))
-      "Fringe face for current position."
-      :group 'realgud)
-
-    (defface realgud-overlay-arrow2
-      '((t
-        :foreground "gray"
-        :weight bold))
-      "Fringe face for position one back in fringe."
-      :group 'realgud)
-
-    (defface realgud-overlay-arrow3
-      '((t
-        :foreground "gainsboro"
-        :weight bold))
-      "Fringe face for position two back in fringe."
-      :group 'realgud)))
+(defface realgud-overlay-arrow1
+  '((((class color) (min-colors 16) (background light)) :foreground 
"ForestGreen" :weight bold)
+    (((class color) (min-colors 16) (background dark))  :foreground 
"PaleGreen" :weight bold)
+    (((class color) (min-colors 8)) :foreground "green")
+    (((class grayscale) (background light)) :foreground "Black" :weight bold)
+    (((class grayscale) (background dark))  :foreground "White" :weight bold)
+    (t :weight bold))
+    "Realgud fringe face for current position indicator."
+    :group 'realgud)
+
+(defface realgud-overlay-arrow2
+  '((((background  dark)) :foreground "white" :weight bold)
+    (((background light)) :foreground "black" :weight bold))
+  "Fringe face for current position."
+  :group 'realgud)
+
+(defface realgud-overlay-arrow3
+  '((((background  dark)) :foreground "DimGray")
+    (((background light)) :foreground "DarkGray"))
+  "Fringe face for current position."
+  :group 'realgud)
 
 
 (defvar realgud-overlay-arrow1 nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]