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

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

[nongnu] elpa/htmlize a040bdd 127/134: Don't try to call color-instance-


From: ELPA Syncer
Subject: [nongnu] elpa/htmlize a040bdd 127/134: Don't try to call color-instance-rgb-components.
Date: Sat, 7 Aug 2021 09:17:21 -0400 (EDT)

branch: elpa/htmlize
commit a040bddea2bb2706abc1dc44d0c2a41f21f2ae79
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>

    Don't try to call color-instance-rgb-components.
    
    It was an XEmacs-only function, and we no longer support XEmacs.
---
 htmlize.el | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/htmlize.el b/htmlize.el
index f0376ce..ab90c28 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -969,15 +969,9 @@ If no rgb.txt file is found, return nil."
           (setq rgb-string (gethash (downcase color) htmlize-color-rgb-hash)))
          (t
           ;; We're getting the RGB components from Emacs.
-          (let ((rgb
-                 (if (fboundp 'color-instance-rgb-components)
-                     (mapcar (lambda (arg)
-                               (/ arg 256))
-                             (color-instance-rgb-components
-                              (make-color-instance color)))
-                   (mapcar (lambda (arg)
-                             (/ arg 256))
-                           (color-values color)))))
+          (let ((rgb (mapcar (lambda (arg)
+                                (/ arg 256))
+                              (color-values color))))
             (when rgb
               (setq rgb-string (apply #'format "#%02x%02x%02x" rgb))))))
     ;; If RGB-STRING is still nil, it means the color cannot be found,



reply via email to

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