diff options
| -rw-r--r-- | lisp/vc-dispatcher.el | 28 | ||||
| -rw-r--r-- | lisp/vc.el | 3 |
2 files changed, 17 insertions, 14 deletions
diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el index e117622b7af..dc7c675cf54 100644 --- a/lisp/vc-dispatcher.el +++ b/lisp/vc-dispatcher.el | |||
| @@ -135,7 +135,7 @@ dispatcher client mode imposes itself." | |||
| 135 | :group 'vc) | 135 | :group 'vc) |
| 136 | 136 | ||
| 137 | (defcustom vc-delete-logbuf-window t | 137 | (defcustom vc-delete-logbuf-window t |
| 138 | "If non-nil, delete the *VC-log* buffer and window after each logical action. | 138 | "If non-nil, delete the log buffer and window after each logical action. |
| 139 | If nil, bury that buffer instead. | 139 | If nil, bury that buffer instead. |
| 140 | This is most useful if you have multiple windows on a frame and would like to | 140 | This is most useful if you have multiple windows on a frame and would like to |
| 141 | preserve the setting." | 141 | preserve the setting." |
| @@ -533,9 +533,9 @@ NOT-URGENT means it is ok to continue if the user says not to save." | |||
| 533 | (set-buffer-modified-p nil) | 533 | (set-buffer-modified-p nil) |
| 534 | (setq buffer-file-name nil)) | 534 | (setq buffer-file-name nil)) |
| 535 | 535 | ||
| 536 | (defun vc-start-logentry (files extra comment initial-contents msg action &optional after-hook) | 536 | (defun vc-start-logentry (files extra comment initial-contents msg logbuf action &optional after-hook) |
| 537 | "Accept a comment for an operation on FILES with extra data EXTRA. | 537 | "Accept a comment for an operation on FILES with extra data EXTRA. |
| 538 | If COMMENT is nil, pop up a VC-log buffer, emit MSG, and set the | 538 | If COMMENT is nil, pop up a LOGBUF buffer, emit MSG, and set the |
| 539 | action on close to ACTION. If COMMENT is a string and | 539 | action on close to ACTION. If COMMENT is a string and |
| 540 | INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial | 540 | INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial |
| 541 | contents of the log entry buffer. If COMMENT is a string and | 541 | contents of the log entry buffer. If COMMENT is a string and |
| @@ -553,8 +553,8 @@ for `vc-log-after-operation-hook'." | |||
| 553 | (get-file-buffer (car files)) | 553 | (get-file-buffer (car files)) |
| 554 | (current-buffer))))) | 554 | (current-buffer))))) |
| 555 | (if (and comment (not initial-contents)) | 555 | (if (and comment (not initial-contents)) |
| 556 | (set-buffer (get-buffer-create "*VC-log*")) | 556 | (set-buffer (get-buffer-create logbuf)) |
| 557 | (pop-to-buffer (get-buffer-create "*VC-log*"))) | 557 | (pop-to-buffer (get-buffer-create logbuf))) |
| 558 | (set (make-local-variable 'vc-parent-buffer) parent) | 558 | (set (make-local-variable 'vc-parent-buffer) parent) |
| 559 | (set (make-local-variable 'vc-parent-buffer-name) | 559 | (set (make-local-variable 'vc-parent-buffer-name) |
| 560 | (concat " from " (buffer-name vc-parent-buffer))) | 560 | (concat " from " (buffer-name vc-parent-buffer))) |
| @@ -587,7 +587,8 @@ the buffer contents as a comment." | |||
| 587 | (unless vc-log-operation | 587 | (unless vc-log-operation |
| 588 | (error "No log operation is pending")) | 588 | (error "No log operation is pending")) |
| 589 | ;; save the parameters held in buffer-local variables | 589 | ;; save the parameters held in buffer-local variables |
| 590 | (let ((log-operation vc-log-operation) | 590 | (let ((logbuf (current-buffer)) |
| 591 | (log-operation vc-log-operation) | ||
| 591 | (log-fileset vc-log-fileset) | 592 | (log-fileset vc-log-fileset) |
| 592 | (log-extra vc-log-extra) | 593 | (log-extra vc-log-extra) |
| 593 | (log-entry (buffer-string)) | 594 | (log-entry (buffer-string)) |
| @@ -603,14 +604,13 @@ the buffer contents as a comment." | |||
| 603 | ;; Remove checkin window (after the checkin so that if that fails | 604 | ;; Remove checkin window (after the checkin so that if that fails |
| 604 | ;; we don't zap the *VC-log* buffer and the typing therein). | 605 | ;; we don't zap the *VC-log* buffer and the typing therein). |
| 605 | ;; -- IMO this should be replaced with quit-window | 606 | ;; -- IMO this should be replaced with quit-window |
| 606 | (let ((logbuf (get-buffer "*VC-log*"))) | 607 | (cond ((and logbuf vc-delete-logbuf-window) |
| 607 | (cond ((and logbuf vc-delete-logbuf-window) | 608 | (delete-windows-on logbuf (selected-frame)) |
| 608 | (delete-windows-on logbuf (selected-frame)) | 609 | ;; Kill buffer and delete any other dedicated windows/frames. |
| 609 | ;; Kill buffer and delete any other dedicated windows/frames. | 610 | (kill-buffer logbuf)) |
| 610 | (kill-buffer logbuf)) | 611 | (logbuf (pop-to-buffer logbuf) |
| 611 | (logbuf (pop-to-buffer "*VC-log*") | 612 | (bury-buffer) |
| 612 | (bury-buffer) | 613 | (pop-to-buffer tmp-vc-parent-buffer))) |
| 613 | (pop-to-buffer tmp-vc-parent-buffer)))) | ||
| 614 | ;; Now make sure we see the expanded headers | 614 | ;; Now make sure we see the expanded headers |
| 615 | (when log-fileset | 615 | (when log-fileset |
| 616 | (mapc | 616 | (mapc |
diff --git a/lisp/vc.el b/lisp/vc.el index 90d2bde0df2..7f355a6c38a 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -1286,6 +1286,7 @@ first backend that could register the file is used." | |||
| 1286 | (or comment (not vc-initial-comment)) | 1286 | (or comment (not vc-initial-comment)) |
| 1287 | nil | 1287 | nil |
| 1288 | "Enter initial comment." | 1288 | "Enter initial comment." |
| 1289 | "*VC-log*" | ||
| 1289 | (lambda (files rev comment) | 1290 | (lambda (files rev comment) |
| 1290 | (dolist (file files) | 1291 | (dolist (file files) |
| 1291 | (message "Registering %s... " file) | 1292 | (message "Registering %s... " file) |
| @@ -1388,6 +1389,7 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." | |||
| 1388 | (vc-start-logentry | 1389 | (vc-start-logentry |
| 1389 | files rev comment initial-contents | 1390 | files rev comment initial-contents |
| 1390 | "Enter a change comment." | 1391 | "Enter a change comment." |
| 1392 | "*VC-log*" | ||
| 1391 | (lambda (files rev comment) | 1393 | (lambda (files rev comment) |
| 1392 | (message "Checking in %s..." (vc-delistify files)) | 1394 | (message "Checking in %s..." (vc-delistify files)) |
| 1393 | ;; "This log message intentionally left almost blank". | 1395 | ;; "This log message intentionally left almost blank". |
| @@ -1728,6 +1730,7 @@ The headers are reset to their non-expanded form." | |||
| 1728 | (vc-start-logentry | 1730 | (vc-start-logentry |
| 1729 | files rev oldcomment t | 1731 | files rev oldcomment t |
| 1730 | "Enter a replacement change comment." | 1732 | "Enter a replacement change comment." |
| 1733 | "*VC-log*" | ||
| 1731 | (lambda (files rev comment) | 1734 | (lambda (files rev comment) |
| 1732 | (vc-call-backend | 1735 | (vc-call-backend |
| 1733 | ;; Less of a kluge than it looks like; log-view mode only passes | 1736 | ;; Less of a kluge than it looks like; log-view mode only passes |