]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix last changes
authorEli Zaretskii <eliz@gnu.org>
Sat, 9 Nov 2024 10:45:14 +0000 (12:45 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 9 Nov 2024 15:49:51 +0000 (16:49 +0100)
* lisp/color.el (color-blend): Fix quoting of apostrophe.
(color-rgb-to-hex, color-blend): Autoload.

(cherry picked from commit 17f4f2dec95d93eae3aaf3c6e4c59955732f8f62)

lisp/color.el

index 30e041c60a72b42cf66c08d1aa01be87f0ead796..cdeaa97ee646b000c58b4ad68d15e9c3d0a8df89 100644 (file)
@@ -55,6 +55,7 @@ If FRAME cannot display COLOR, return nil."
   (let ((valmax (float (car (color-values "#ffffffffffff")))))
     (mapcar (lambda (x) (/ x valmax)) (color-values color frame))))
 
+;;;###autoload
 (defun color-rgb-to-hex  (red green blue &optional digits-per-component)
   "Return hexadecimal #RGB notation for the color specified by RED GREEN BLUE.
 RED, GREEN, and BLUE should be numbers between 0.0 and 1.0, inclusive.
@@ -75,6 +76,7 @@ components (e.g. \"#ffff1212ecec\")."
           (- 1.0 (nth 1 color))
           (- 1.0 (nth 2 color)))))
 
+;;;###autoload
 (defun color-blend (a b &optional alpha)
   "Blend the two colors A and B in linear space with ALPHA.
 A and B should be lists (RED GREEN BLUE), where each element is
@@ -83,7 +85,7 @@ has on the result and should be between 0.0 and 1.0, inclusive.
 
 For instance:
 
-   (color-blend '(1 0.5 1) '(0 0 0) 0.75)
+   (color-blend \\='(1 0.5 1) \\='(0 0 0) 0.75)
       => (0.75 0.375 0.75)"
   (setq alpha (or alpha 0.5))
   (let (blend)