From: Artur Malabarba Date: Sat, 5 Dec 2015 11:25:08 +0000 (+0000) Subject: Fix #39 - Allow for the absence of a background color X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/fee1e5ec2db0af915463db24d0be3b5518cee9f3 Fix #39 - Allow for the absence of a background color This should prevent issues with emacs daemon. --- diff --git a/beacon.el b/beacon.el index 76c0db0dd..3ae584d39 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))