comparison lisp/vc.el @ 8349:a61f6295ee0e

(vc-next-action): Even in 1-file case, get its name from FILES. (vc-finish-logentry): Don't do vc-buffer-sync on the parent buffer when that parent buffer is a dired buffer.
author Richard M. Stallman <rms@gnu.org>
date Tue, 26 Jul 1994 20:34:16 +0000
parents f95e050e272f
children b3afbc67aa6b
comparison
equal deleted inserted replaced
8348:bf950cbd542c 8349:a61f6295ee0e
468 (interactive "P") 468 (interactive "P")
469 (catch 'nogo 469 (catch 'nogo
470 (if vc-dired-mode 470 (if vc-dired-mode
471 (let ((files (dired-get-marked-files))) 471 (let ((files (dired-get-marked-files)))
472 (if (= (length files) 1) 472 (if (= (length files) 1)
473 (find-file-other-window (dired-get-filename)) 473 (find-file-other-window (car files))
474 (vc-start-entry nil nil nil 474 (vc-start-entry nil nil nil
475 "Enter a change comment for the marked files." 475 "Enter a change comment for the marked files."
476 'vc-next-action-dired) 476 'vc-next-action-dired)
477 (throw 'nogo nil)))) 477 (throw 'nogo nil))))
478 (while vc-parent-buffer 478 (while vc-parent-buffer
526 526
527 (defun vc-start-entry (file rev comment msg action &optional after-hook) 527 (defun vc-start-entry (file rev comment msg action &optional after-hook)
528 ;; Accept a comment for an operation on FILE revision REV. If COMMENT 528 ;; Accept a comment for an operation on FILE revision REV. If COMMENT
529 ;; is nil, pop up a VC-log buffer, emit MSG, and set the 529 ;; is nil, pop up a VC-log buffer, emit MSG, and set the
530 ;; action on close to ACTION; otherwise, do action immediately. 530 ;; action on close to ACTION; otherwise, do action immediately.
531 ;; Remember the file's buffer in parent-buffer (current one if no file). 531 ;; Remember the file's buffer in vc-parent-buffer (current one if no file).
532 ;; AFTER-HOOK specifies the local value for vc-log-operation-hook. 532 ;; AFTER-HOOK specifies the local value for vc-log-operation-hook.
533 (let ((parent (if file (find-file-noselect file) (current-buffer)))) 533 (let ((parent (if file (find-file-noselect file) (current-buffer))))
534 (if comment 534 (if comment
535 (set-buffer (get-buffer-create "*VC-log*")) 535 (set-buffer (get-buffer-create "*VC-log*"))
536 (pop-to-buffer (get-buffer-create "*VC-log*"))) 536 (pop-to-buffer (get-buffer-create "*VC-log*")))
674 (if (null vc-comment-ring) 674 (if (null vc-comment-ring)
675 (setq vc-comment-ring (make-ring vc-maximum-comment-ring-size))) 675 (setq vc-comment-ring (make-ring vc-maximum-comment-ring-size)))
676 (ring-insert vc-comment-ring (buffer-string)) 676 (ring-insert vc-comment-ring (buffer-string))
677 )) 677 ))
678 ;; Sync parent buffer in case the user modified it while editing the comment. 678 ;; Sync parent buffer in case the user modified it while editing the comment.
679 ;; But not if it is a vc-dired buffer.
679 (save-excursion 680 (save-excursion
680 (let ((buffer (get-file-buffer vc-log-file))) 681 (set-buffer vc-parent-buffer)
681 (if buffer 682 (or vc-dired-mode
682 (progn 683 (vc-buffer-sync)))
683 (set-buffer buffer)
684 (vc-buffer-sync)))))
685 ;; OK, do it to it 684 ;; OK, do it to it
686 (if vc-log-operation 685 (if vc-log-operation
687 (save-excursion 686 (save-excursion
688 (funcall vc-log-operation 687 (funcall vc-log-operation
689 vc-log-file 688 vc-log-file