diff --git a/lisp/scratch-pkgs.el b/lisp/scratch-pkgs.el index 6e7bb6b..0fe168b 100644 --- a/lisp/scratch-pkgs.el +++ b/lisp/scratch-pkgs.el @@ -200,8 +200,14 @@ which ones are scratch by looking at the local repos." (error "Could not init repository for new package")) (unless (eq 0 (call-process git-bin nil output nil "add" (buffer-file-name))) (pop-to-buffer output) - (error "Could not add new package: %s" (buffer-file-name)))) - (run-hooks 'scratch-pkgs-after-package-init-hook))) + (error "Could not add new package: %s" (buffer-file-name))) + (pcase scratch-pkgs-mode + ((or 'elpaca 'straight) + (unless (eq 0 (call-process git-bin nil output nil + "commit" "-m" "first commit")) + (pop-to-buffer output) + (error "Could not add new package: %s" (buffer-file-name))))) + (run-hooks 'scratch-pkgs-after-package-init-hook)))) ;;;###autoload (defun scratch-pkgs-new (name)