X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/blobdiff_plain/bce79a6aa39e4d135b675131f68e6bbd12433e4a..e7231e4f2ac4b73b6ae14762cf82a24aaa12d8f8:/contrib/stgit.el diff --git a/contrib/stgit.el b/contrib/stgit.el index acad87b..372014f 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -806,15 +806,15 @@ (defun stgit-delete (patchsyms) "Delete the patches in PATCHSYMS. Interactively, delete the marked patches, or the patch at point." (interactive (list (stgit-patches-marked-or-at-point))) + (unless patchsyms + (error "No patches to delete")) (let ((npatches (length patchsyms))) - (if (zerop npatches) - (error "No patches to delete") - (when (yes-or-no-p (format "Really delete %d patch%s? " - npatches - (if (= 1 npatches) "" "es"))) - (stgit-capture-output nil - (apply 'stgit-run "delete" patchsyms)) - (stgit-reload))))) + (when (yes-or-no-p (format "Really delete %d patch%s? " + npatches + (if (= 1 npatches) "" "es"))) + (stgit-capture-output nil + (apply 'stgit-run "delete" patchsyms)) + (stgit-reload)))) (defun stgit-coalesce (patchsyms) "Coalesce the patches in PATCHSYMS.