From 8755ed787bc965c2828e75c3e4237d3e67414d05 Mon Sep 17 00:00:00 2001 From: David Caldwell Date: Sun, 21 Mar 2010 01:11:29 -0700 Subject: [PATCH] [commit-patch-buffer.el] Add commit-patch-current-buffer which skips the "ask for buffer to patch" step. So far in all my years of commit-patch usage I don't think I've ever needed to commit a buffer that I wasn't looking at right then. --- commit-patch-buffer.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commit-patch-buffer.el b/commit-patch-buffer.el index da42fa5..81ca68a 100644 --- a/commit-patch-buffer.el +++ b/commit-patch-buffer.el @@ -55,6 +55,11 @@ `((log-edit-listfun . (lambda () ',patch-files))) "*commit*"))) +(defun commit-patch-current-buffer (directory) + "Commit the patch in the current buffer applying it from DIRECTORY." + (interactive "DDirectory: ") + (commit-patch-buffer (buffer-name) directory)) + (eval-after-load 'diff-mode '(progn (setq diff-default-read-only nil) (define-key diff-mode-map "\C-c\C-c" 'commit-patch-buffer))) -- 2.51.2