stgit.el: Minor beautification
authorGustav Hållberg <gustav@virtutech.com>
Mon, 12 Jan 2009 20:20:14 +0000 (21:20 +0100)
committerKarl Hasselström <kha@treskal.com>
Thu, 22 Jan 2009 22:57:38 +0000 (23:57 +0100)
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
contrib/stgit.el

index acad87b..372014f 100644 (file)
@@ -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.