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

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

[nongnu] elpa/htmlize 94faffa 056/134: Just use `locate-file'.


From: ELPA Syncer
Subject: [nongnu] elpa/htmlize 94faffa 056/134: Just use `locate-file'.
Date: Sat, 7 Aug 2021 09:17:06 -0400 (EDT)

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

    Just use `locate-file'.
---
 htmlize.el | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/htmlize.el b/htmlize.el
index e7a87a6..645b772 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -649,13 +649,6 @@ without modifying their meaning."
 
 ;;; Color handling.
 
-(if (fboundp 'locate-file)
-    (defalias 'htmlize-locate-file 'locate-file)
-  (defun htmlize-locate-file (file path)
-    (dolist (dir path nil)
-      (when (file-exists-p (expand-file-name file dir))
-       (return (expand-file-name file dir))))))
-
 (defvar htmlize-x-library-search-path
   '("/usr/X11R6/lib/X11/"
     "/usr/X11R5/lib/X11/"
@@ -687,7 +680,7 @@ If RGB-FILE is nil, the function will try hard to find a 
suitable file
 in the system directories.
 
 If no rgb.txt file is found, return nil."
-  (let ((rgb-file (or rgb-file (htmlize-locate-file
+  (let ((rgb-file (or rgb-file (locate-file
                                "rgb.txt"
                                htmlize-x-library-search-path)))
        (hash nil))



reply via email to

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