emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/face-shift 95efc40b7b 02/50: converted all tabs to spac


From: ELPA Syncer
Subject: [elpa] externals/face-shift 95efc40b7b 02/50: converted all tabs to spaces
Date: Sun, 30 Apr 2023 12:03:18 -0400 (EDT)

branch: externals/face-shift
commit 95efc40b7b90579868581db40bf19fa198c7c604
Author: Philip K <philip@warpmail.net>
Commit: Philip K <philip@warpmail.net>

    converted all tabs to spaces
---
 .dir-locals.el |  5 ++++
 face-shift.el  | 74 +++++++++++++++++++++++++++++-----------------------------
 2 files changed, 42 insertions(+), 37 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000000..3bcda9266b
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,5 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+
+((emacs-lisp-mode
+  (indent-tabs-mode . nil)))
diff --git a/face-shift.el b/face-shift.el
index 816eb466ec..2a08be1034 100644
--- a/face-shift.el
+++ b/face-shift.el
@@ -33,11 +33,11 @@ by wrapping values over 1 to 1."
 
 (defcustom face-shift-colors
   '((blue .   ((int min min) (min max min) (min min max)))
-       (pink .   ((max min min) (min int min) (min min max)))
-       (yellow . ((max min min) (min max min) (min min int)))
-       (peach .  ((max min min) (min int min) (min min int)))
-       (green .  ((int min min) (min max min) (min min int)))
-       (purple . ((int min min) (min int min) (min min max))))
+    (pink .   ((max min min) (min int min) (min min max)))
+    (yellow . ((max min min) (min max min) (min min int)))
+    (peach .  ((max min min) (min int min) (min min int)))
+    (green .  ((int min min) (min max min) (min min int)))
+    (purple . ((int min min) (min int min) (min min max))))
   "Alist of matrices representing RGB transformations towards a
   certain hue. Symbols `int', `max' and `min' are substituted
   with `face-shift-intensity', `face-shift-maximum' and
@@ -47,11 +47,11 @@ by wrapping values over 1 to 1."
 
 (defcustom face-shift-faces
   (append '(default cursor region isearch)
-                 (cl-remove-if-not
-                  (lambda (sym)
-                        (string-match-p (rx bos "font-lock-")
-                                                        (symbol-name sym)))
-                  (face-list)))
+          (cl-remove-if-not
+           (lambda (sym)
+             (string-match-p (rx bos "font-lock-")
+                             (symbol-name sym)))
+           (face-list)))
   "Faces that `face-shift' should distort."
   :type '(list face)
   :group 'face-shift)
@@ -60,24 +60,24 @@ by wrapping values over 1 to 1."
   "Call `face-remap-add-relative' on FACE by distorting the
 colour behind PROP by MAT in an RGB colour space."
   (let* ((mvp (lambda (vec)
-                               (mapcar (lambda (row)
-                                                 (apply #'+ (cl-mapcar #'* row 
vec)))
-                                               mat)))
-                (bg (face-attribute face prop))
-                (colors (color-name-to-rgb bg))
-                (trans (funcall mvp colors))
-                (ncolor
-                 (apply
-                  #'color-rgb-to-hex
-                  (append
-                       (if face-shift-force-fit
-                               (mapcar (lambda (x) (if (< x 1) 1 x))
-                                               trans)
-                         trans)
-                       '(2)))))
-       (unless (eq bg 'unspecified)
-         (face-remap-add-relative face `(,prop ,ncolor)))
-       ncolor))
+                (mapcar (lambda (row)
+                          (apply #'+ (cl-mapcar #'* row vec)))
+                        mat)))
+         (bg (face-attribute face prop))
+         (colors (color-name-to-rgb bg))
+         (trans (funcall mvp colors))
+         (ncolor
+          (apply
+           #'color-rgb-to-hex
+           (append
+            (if face-shift-force-fit
+                (mapcar (lambda (x) (if (< x 1) 1 x))
+                        trans)
+              trans)
+            '(2)))))
+    (unless (eq bg 'unspecified)
+      (face-remap-add-relative face `(,prop ,ncolor)))
+    ncolor))
 
 (defun face-shift (color &optional ignore)
   "Produce a function that will shift all background and
@@ -93,14 +93,14 @@ ignored by this hook. For example
 will apply the green shift, unless the mode of the hook it was
 added to is mail-mode or a derivative."
   (let ((mat (cl-sublis
-                         `((int . ,face-shift-intensity)
-                               (max . ,face-shift-maximum)
-                               (min . ,face-shift-minimum))
-                         (cdr (assq color face-shift-colors)))))
-       (lambda ()
-         (unless (cl-some #'derived-mode-p ignore)
-               (dolist (face face-shift-faces)
-                 (face-shift-by face :foreground mat)
-                 (face-shift-by face :background mat))))))
+              `((int . ,face-shift-intensity)
+                (max . ,face-shift-maximum)
+                (min . ,face-shift-minimum))
+              (cdr (assq color face-shift-colors)))))
+    (lambda ()
+      (unless (cl-some #'derived-mode-p ignore)
+        (dolist (face face-shift-faces)
+          (face-shift-by face :foreground mat)
+          (face-shift-by face :background mat))))))
 
 (provide 'face-shift)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]