branch: master
commit c9cc62d42ef0c14079c97890bdd402c8efa4e52b
Merge: aaeb619 913086b
Author: Artur Malabarba <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #50 from DamienCassou/fix-crash-in-emacs-daemon
Don't crash when Emacs runs as a daemon
---
beacon.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/beacon.el b/beacon.el
index 9a3edac..93e6646 100644
--- a/beacon.el
+++ b/beacon.el
@@ -280,9 +280,10 @@ Only returns `beacon-size' elements."
(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))
- (mapcar (lambda (n) (butlast (beacon--int-range (elt fg n) (elt bg
n))))
- [0 1 2]))))
+ (when bg
+ (apply #'seq-mapn (lambda (r g b) (format "#%04x%04x%04x" r g b))
+ (mapcar (lambda (n) (butlast (beacon--int-range (elt fg n) (elt
bg n))))
+ [0 1 2])))))
;;; Blinking