Created
October 30, 2016 17:26
-
-
Save m0smith/1d4279dd406920d357ca324e5628a38f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun list-to-hash (coll) | |
(let ((rtnval (make-hash-table :test 'equal))) | |
(cl-loop for r across coll | |
when r | |
do (puthash (elt r 1) nil rtnval)) | |
rtnval)) | |
(defun jdee-open-source-resource-in-archive-p (archive resource) | |
"" | |
(interactive) | |
(when (and (file-exists-p archive) | |
(not (file-directory-p archive))) | |
(let ((buffer (find-file-noselect archive))) | |
(when buffer | |
(with-current-buffer buffer | |
(let* ((files archive-files) | |
(r (list-to-hash files))) | |
(if (eq 'missing (gethash resource r 'missing)) | |
nil | |
(list archive resource)))))))) | |
(defun jdee-open-source-resource-in-classpath (resource) | |
(cl-loop for p in jdee-global-classpath | |
for rtnval = (jdee-open-source-resource-in-archive-p r resource) | |
when rtnval | |
return rtnval)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment