 ;;-------------------------------------------
 ;;; auto load module
 ;;-------------------------------------------
+(defvar modules-with-manual nil)
+
+(defun module-get-path (&optional directory)
+  (or directory (expand-file-name "module" user-emacs-directory)))
+
 (defun module-load (path)
   (when (file-exists-p path)
     (if (file-directory-p path)

  (when (not (executable-find exec))
    (throw 'require-exit nil)))

(provide 'core-module)

      (ignore-errors (load path t)))))

(defun autoload-modules (&optional directory)
  (let* ((dir (module-get-path directory))
         (files (directory-files dir))
         (module-files (remove-if-not
                        (lambda (x) (string-match-p "^module-" x))
