]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix #34 background-color-at-point isn't 100% reliable
authorArtur Malabarba <bruce.connor.am@gmail.com>
Sat, 31 Oct 2015 07:30:23 +0000 (07:30 +0000)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Sat, 31 Oct 2015 07:30:23 +0000 (07:30 +0000)
beacon.el

index be77a38c24c46ff720ee0a48279bb77069eebfb8..9a9f8167a2d6ed44d704cd753907d5eab1f87b22 100644 (file)
--- a/beacon.el
+++ b/beacon.el
@@ -236,7 +236,8 @@ Only returns `beacon-size' elements."
 
 (defun beacon--color-range ()
   "Return a list of background colors for the beacon."
-  (let* ((default-bg (background-color-at-point))
+  (let* ((default-bg (or (background-color-at-point)
+                         (face-background 'default)))
          (bg (color-values (if (string-match "\\`unspecified-" default-bg)
                                (face-attribute 'beacon-fallback-background :background)
                              default-bg)))