From 580c1a76a921574b9e8d7985dde751f600eb39a6 Mon Sep 17 00:00:00 2001 From: David Caldwell Date: Sun, 21 Mar 2010 04:54:47 -0700 Subject: [PATCH] [commit-patch-buffer.el] Rearrange names and get rid of now pointless function. There are now just 2 functions: commit-patch-buffer - Fully automatic, takes no arguments (bound to C-c C-c). commit-patch-buffer-manually - Takes 2 interactive arguments. Dropped commit-patch-current-buffer which took just a directory argument as it seems pointless now--use commit-patch-buffer-manually instead. --- commit-patch-buffer.el | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/commit-patch-buffer.el b/commit-patch-buffer.el index cb651fc..231a654 100644 --- a/commit-patch-buffer.el +++ b/commit-patch-buffer.el @@ -6,7 +6,7 @@ (require 'vc) (require 'log-edit) -(defun commit-patch-buffer (buffer directory) +(defun commit-patch-buffer-manually (buffer directory) "Commit the patch found in BUFFER applying it from DIRECTORY." (interactive "bBuffer to commit: \nDDirectory: ") (let* ((patch-files (with-temp-buffer @@ -55,15 +55,10 @@ `((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)) - -(defun commit-patch-current-buffer-autodetect-directory () - "Commit the patch in the current buffer applying it to the appropriate directory." +(defun commit-patch-buffer () + "Commit the patch in the current buffer, applying it to the appropriate directory." (interactive) - (commit-patch-current-buffer (autodetect-patch-directory-root))) + (commit-patch-buffer-manually (buffer-name) (autodetect-patch-directory-root))) (defun autodetect-patch-directory-root () "Tries to autodect where a patch should be committed from using the -- 2.51.2