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

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

[elpa] master fee1e5e 4/9: Fix #39 - Allow for the absence of a backgrou


From: Artur Malabarba
Subject: [elpa] master fee1e5e 4/9: Fix #39 - Allow for the absence of a background color
Date: Sat, 16 Jan 2016 09:42:01 +0000

branch: master
commit fee1e5ec2db0af915463db24d0be3b5518cee9f3
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    Fix #39 - Allow for the absence of a background color
    
    This should prevent issues with emacs daemon.
---
 beacon.el |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/beacon.el b/beacon.el
index 76c0db0..3ae584d 100644
--- a/beacon.el
+++ b/beacon.el
@@ -266,8 +266,9 @@ Only returns `beacon-size' elements."
                              default-bg)))
          (fg (cond
               ((stringp beacon-color) (color-values beacon-color))
-              ((< (color-distance "black" bg)
-                  (color-distance "white" bg))
+              ((and (stringp bg)
+                    (< (color-distance "black" bg)
+                       (color-distance "white" bg)))
                (make-list 3 (* beacon-color 65535)))
               (t (make-list 3 (* (- 1 beacon-color) 65535))))))
     (apply #'seq-mapn (lambda (r g b) (format "#%04x%04x%04x" r g b))



reply via email to

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