changeset 4427:b59611e9dd64

mq.el: add hook to run when finishing the edit of a patch.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 08 May 2007 11:54:39 -0700
parents 807c7b99ff13
children fa51e66117b4
files contrib/mq.el
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/mq.el	Tue May 08 11:54:39 2007 -0700
+++ b/contrib/mq.el	Tue May 08 11:54:39 2007 -0700
@@ -36,6 +36,11 @@
   :type 'sexp
   :group 'mercurial)
 
+(defcustom mq-edit-finish-hook nil
+  "Hook run before a patch description is finished up with."
+  :type 'sexp
+  :group 'mercurial)
+
 
 ;;; Internal variables.
 
@@ -237,6 +242,7 @@
   (unless (equal (mq-patch-info "qtop") mq-top)
     (error "Topmost patch has changed!"))
   (hg-sync-buffers hg-root)
+  (run-hooks 'mq-edit-finish-hook)
   (mq-refresh-internal hg-root "-m" (buffer-substring (point-min) (point-max)))
   (let ((buf mq-prev-buffer))
     (kill-buffer nil)