From: Gustav Hållberg Date: Mon, 12 Jan 2009 20:20:14 +0000 (+0100) Subject: stgit.el: Minor beautification X-Git-Tag: v0.15-rc1~53 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/e7231e4f2ac4b73b6ae14762cf82a24aaa12d8f8 stgit.el: Minor beautification Signed-off-by: Gustav Hållberg Signed-off-by: Karl Hasselström --- 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 @@ end of the patch." "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.