Emacs: kill commit buffer once it's done with.
authorBryan O'Sullivan <bos@serpentine.com>
Mon, 22 Aug 2005 03:27:27 -0700
changeset 1000 3362b410c219
parent 999 bb391518bc28
child 1001 ab3939ccbf10
Emacs: kill commit buffer once it's done with.
contrib/mercurial.el
--- a/contrib/mercurial.el	Mon Aug 22 03:16:32 2005 -0700
+++ b/contrib/mercurial.el	Mon Aug 22 03:27:27 2005 -0700
@@ -610,7 +610,9 @@
 
 (defun hg-commit-abort ()
   (interactive)
-  (error "not implemented"))
+  (let ((buf hg-prev-buffer))
+    (kill-buffer nil)
+    (switch-to-buffer buf)))
 
 (defun hg-commit-finish ()
   (interactive)
@@ -637,7 +639,10 @@
 	       (not hg-commit-allow-empty-file-list))
       (error "Cannot proceed - no files to commit"))
     (setq message (concat message "\n"))
-    (apply 'hg-run0 "--cwd" hg-root "commit" "-m" message files)))
+    (apply 'hg-run0 "--cwd" hg-root "commit" "-m" message files)
+    (let ((buf hg-prev-buffer))
+      (kill-buffer nil)
+      (switch-to-buffer buf))))
 
 (defun hg-commit-mode ()
   "Mode for describing a commit of changes to a Mercurial repository.