 (cl-defun vendle:add-to-package-list (package)
   (add-to-list '*vendle-package-list* package))
 
-;;; utilily functions
+;;;; utilily functions
 
 (cl-defun vendle:concat-path (&rest parts)
   (cl-reduce (lambda (a b) (expand-file-name b a)) parts))
+
+(cl-defun vendle:compile (package path)
+  (if (vendle:package-compile package)
+      (byte-recompile-directory path 0)))
+
+(cl-defun vendle:message (fmt &rest text)
+  (apply 'message (cl-concatenate 'string "vendle: " fmt)
+         text))
+
+;;;; search
+(cl-defun vendle:search-registered (_key _term)
+  (cl-remove-if-not
+   (lambda (p)
+     (cl-case _term
+       (name
+        (cl-equalp _key (vendle:package-name p)))
+       (type
+        (cl-equalp _key (vendle:package-type p)))
+       (path
+        (cl-equalp _key (vendle:package-path p)))))
+   *vendle-package-list*))
 
 ;;;; initialize
 

               (not (file-symlink-p path)))
      (progn
        (cd-absolute path)
        (message "vendle: updating vendle package %s.." path)
        (shell-command "git pull")
        (cd-absolute user-emacs-directory)
        (byte-recompile-directory path 0)
        (message "vendle: updating vendle package %s.. done" path)))))

;;;; install


(require 'vendle-source-git "vendle/source/git")
(require 'vendle-package "vendle/package")

;;;; internal functions

(cl-defun vendle:directory-git-p (p)
  (if (file-directory-p (expand-file-name ".git" p))
