From 5773b198f891cacb8a2c4f7615c4fb3b3416794f Mon Sep 17 00:00:00 2001 From: David Caldwell Date: Sun, 24 Oct 2010 14:57:35 -0700 Subject: [PATCH] [commit-patch-buffer.el] Accept a prefix parameter to commit-patch-buffer which makes it ask for the buffer and directory, like old times. --- commit-patch-buffer.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commit-patch-buffer.el b/commit-patch-buffer.el index 93f2850..7747be8 100644 --- a/commit-patch-buffer.el +++ b/commit-patch-buffer.el @@ -55,13 +55,13 @@ `((log-edit-listfun . (lambda () ',patch-files))) "*commit*"))) -(defun commit-patch-buffer () +(defun commit-patch-buffer (&optional arg) "Commit the patch in the current buffer, applying it to the appropriate directory. If the current buffer is not in diff-mode -then it will ask interactively which buffer to commit and to which -directory to commit it." - (interactive) - (if (eq major-mode 'diff-mode) +or ARG is non-nil then it will ask interactively which buffer to +commit and to which directory to commit it." + (interactive "P") + (if (and (not arg) (eq major-mode 'diff-mode)) (commit-patch-buffer-in-directory (buffer-name) (autodetect-patch-directory-root)) (call-interactively 'commit-patch-buffer-in-directory))) -- 2.51.2