summaryrefslogtreecommitdiff
path: root/lisp/vc/log-edit.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-07-11 12:35:13 +0800
committerChong Yidong <cyd@gnu.org>2012-07-11 12:35:13 +0800
commit9af577566add17398ee3b778ac9934bc391eecf7 (patch)
tree0d25dec5da3788e495ab505361e0de9f93765314 /lisp/vc/log-edit.el
parent984e7f300ef0bfec7be97c9bbaff5a6295a43aa2 (diff)
downloademacs-9af577566add17398ee3b778ac9934bc391eecf7.tar.gz
Allow use of vc-root-* commands in *vc-log* buffers.
* lisp/vc/log-edit.el (log-edit-vc-backend): New variable. (log-edit): Doc fix. * lisp/vc/log-view.el (log-view-vc-fileset, log-view-vc-backend): Doc fix. * lisp/vc/vc-dispatcher.el (vc-log-edit): New args. Use PARAMS argument of log-edit to set up all local variables. (vc-start-logentry): New optional arg specifying VC backend. * lisp/vc/vc.el (vc-checkin): Use it. (vc-deduce-fileset): Handle Log Edit buffers. (vc-diff): Make first argument optional too.
Diffstat (limited to 'lisp/vc/log-edit.el')
-rw-r--r--lisp/vc/log-edit.el31
1 files changed, 19 insertions, 12 deletions
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index 5ae311222ba..7ee000a8aea 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -190,6 +190,9 @@ when this variable is set to nil.")
(defvar log-edit-parent-buffer nil)
+(defvar log-edit-vc-backend nil
+ "VC fileset corresponding to the current log.")
+
;;; Originally taken from VC-Log mode
(defconst log-edit-maximum-comment-ring-size 32
@@ -405,23 +408,27 @@ automatically."
;;;###autoload
(defun log-edit (callback &optional setup params buffer mode &rest _ignore)
"Setup a buffer to enter a log message.
-\\<log-edit-mode-map>The buffer will be put in mode MODE or `log-edit-mode'
-if MODE is nil.
-If SETUP is non-nil, the buffer is then erased and `log-edit-hook' is run.
-Mark and point will be set around the entire contents of the buffer so
-that it is easy to kill the contents of the buffer with \\[kill-region].
-Once you're done editing the message, pressing \\[log-edit-done] will call
-`log-edit-done' which will end up calling CALLBACK to do the actual commit.
-
-PARAMS if non-nil is an alist. Possible keys and associated values:
+The buffer is put in mode MODE or `log-edit-mode' if MODE is nil.
+\\<log-edit-mode-map>
+If SETUP is non-nil, erase the buffer and run `log-edit-hook'.
+Set mark and point around the entire contents of the buffer, so
+that it is easy to kill the contents of the buffer with
+\\[kill-region]. Once the user is done editing the message,
+invoking the command \\[log-edit-done] (`log-edit-done') will
+call CALLBACK to do the actual commit.
+
+PARAMS if non-nil is an alist of variables and buffer-local
+values to give them in the Log Edit buffer. Possible keys and
+associated values:
`log-edit-listfun' -- function taking no arguments that returns the list of
files that are concerned by the current operation (using relative names);
`log-edit-diff-function' -- function taking no arguments that
displays a diff of the files concerned by the current operation.
+ `vc-log-fileset' -- the VC fileset to be committed (if any).
-If BUFFER is non-nil `log-edit' will jump to that buffer, use it to edit the
-log message and go back to the current buffer when done. Otherwise, it
-uses the current buffer."
+If BUFFER is non-nil `log-edit' will jump to that buffer, use it
+to edit the log message and go back to the current buffer when
+done. Otherwise, it uses the current buffer."
(let ((parent (current-buffer)))
(if buffer (pop-to-buffer buffer))
(when (and log-edit-setup-invert (not (eq setup 'force)))