[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/autothemer cd4724173d 03/21: Bugfix: ignore colors that ar
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/autothemer cd4724173d 03/21: Bugfix: ignore colors that are not color-defined-p |
Date: |
Thu, 6 Jan 2022 02:58:05 -0500 (EST) |
branch: elpa/autothemer
commit cd4724173d8a1f34a4bf0c98622d8a0c765eb7d4
Author: Sebastian Sturm <sturm@itp.uni-leipzig.de>
Commit: Sebastian Sturm <sturm@itp.uni-leipzig.de>
Bugfix: ignore colors that are not color-defined-p
otherwise, color specifications such as "color-237" would yield a
distance of 0 and shadow all the reasonable palette entries
---
autothemer.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/autothemer.el b/autothemer.el
index 9f010ad2a7..ee6a7f124c 100644
--- a/autothemer.el
+++ b/autothemer.el
@@ -106,10 +106,11 @@ of `autothemer--color' structs."
(let ((mindistance 0)
(closest-color nil))
(mapc (lambda (candidate)
- (let ((distance (autothemer--color-distance color candidate)))
- (if (or (not closest-color) (< distance mindistance))
- (setq closest-color candidate
- mindistance distance))))
+ (when (color-defined-p (autothemer--color-value candidate))
+ (let ((distance (autothemer--color-distance color candidate)))
+ (if (or (not closest-color) (< distance mindistance))
+ (setq closest-color candidate
+ mindistance distance)))))
colors)
closest-color))
- [nongnu] branch elpa/autothemer created (now 36f1f4f0c7), ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 6510a81209 01/21: First working version, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer cd4724173d 03/21: Bugfix: ignore colors that are not color-defined-p,
ELPA Syncer <=
- [nongnu] elpa/autothemer b0bf38b202 05/21: Cleanup, add package header, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer f7be1b486f 04/21: Cleanup, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 84a331860f 09/21: Fix for cl-lib, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 869c0e98d7 10/21: Merge pull request #3 from syohex/cl-lib, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer add7d430e0 13/21: call deftheme before evaluating BODY, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 13d1eafc04 14/21: Bump package version to 0.2.2, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer d2f0fa1d92 16/21: Rework and flesh-out the README documentation (#9), ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 69488c71df 18/21: Do not require autothemer or dash at runtime. (#13), ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 36f1f4f0c7 21/21: Bump version to 0.2.3, ELPA Syncer, 2022/01/06
- [nongnu] elpa/autothemer 8b865c39a2 08/21: Add readme, ELPA Syncer, 2022/01/06