 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;; Low-level API
 
+(defun straight--norm (string-or-symbol)
+  (if (symbolp string-or-symbol)
+      (symbol-name string-or-symbol)
+    string-or-symbol))
+
 (defun straight--dir (&rest segments)
   (apply 'concat user-emacs-directory
          (mapcar (lambda (segment)
-                   (concat segment "/"))
+                   (concat (straight--norm segment) "/"))
                  (cons "straight" segments))))
 
 (defun straight--file (&rest segments)

                    nil 'silent))))

(defun straight--validate-build-recipe (build-recipe)
  (unless (plist-get :name build-recipe)
    (error "build recipe is missing `:name': %S" build-recipe))
  (unless (plist-get :repo build-recipe)
    (error "build recipe is missing `:repo': %S" build-recipe)))

;;;###autoload
(defun straight-package-might-be-modified-p (build-recipe)
  (straight--validate-build-recipe build-recipe)
  (let* ((name (plist-get :name build-recipe))
         (mtime (gethash name straight--cache)))
    (or (not mtime)
        (with-temp-buffer


(defun straight-add-package-to-load-path (build-recipe)
  (straight--validate-build-recipe build-recipe)
  (let ((name (plist-get build-recipe :name)))
    (add-to-list 'load-path (straight--dir "build" name))))

(defun straight-install-package-autoloads (build-recipe)
  (straight--validate-build-recipe build-recipe)
  (let ((name (plist-get build-recipe :name)))
    (load-file (straight--file
                "build" name
                (straight--autoload-file name)))))
