branch: externals/face-shift
commit 2ddb8a90d242dab3c285672812def8534a124978
Author: Philip K <[email protected]>
Commit: Philip K <[email protected]>
removed dependency on when-let*
---
face-shift.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/face-shift.el b/face-shift.el
index f5934f7e22..358877f93b 100644
--- a/face-shift.el
+++ b/face-shift.el
@@ -94,12 +94,13 @@ If BUFFER is nil, use current buffer."
(when colour
(dolist (face face-shift-faces)
(dolist (prop '(:foreground :background))
- (when-let* ((attr (face-attribute face prop))
- (rgb (color-name-to-rgb attr))
- (shift (cl-map 'list #'* col-rgb rgb))
- (new (apply #'color-rgb-to-hex shift)))
- (push (face-remap-add-relative face `(,prop ,new))
- face-shift--cookies))))))))
+ (let* ((attr (face-attribute face prop))
+ (rgb (and attr (color-name-to-rgb attr)))
+ (shift (and rgb (cl-map 'list #'* col-rgb rgb)))
+ (new (and shift (apply #'color-rgb-to-hex shift))))
+ (when new
+ (push (face-remap-add-relative face `(,prop ,new))
+ face-shift--cookies)))))))))
(defun face-shift-clear (buffer)
"Undo colour shifts in BUFFER by `face-shift-setup'."