Commit 69268c78 authored by Roland McGrath's avatar Roland McGrath
Browse files

(vc-comment-to-change-log): Don't take FILE argument, since

vc-update-change-log doesn't support it anyway.
Don't bind default-directory.  Instead pass second arg to file-relative-name.
(vc-update-change-log): Use find-change-log instead of hardcoding.
parent 758c80c0
;;; vc.el --- drive a version-control system from within Emacs ;;; vc.el --- drive a version-control system from within Emacs
;; Copyright (C) 1992 Free Software Foundation, Inc. ;; Copyright (C) 1992, 1993 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
;; Version: 5.4 ;; Version: 5.4
...@@ -586,17 +586,15 @@ popped up to accept a comment." ...@@ -586,17 +586,15 @@ popped up to accept a comment."
;;; Here is a checkin hook that may prove useful to sites using the ;;; Here is a checkin hook that may prove useful to sites using the
;;; ChangeLog facility supported by Emacs. ;;; ChangeLog facility supported by Emacs.
(defun vc-comment-to-change-log (&optional file) (defun vc-comment-to-change-log ()
"Update change log from VC change comments entered for the current file. "Update change log from VC change comments entered for the current file.
Optional FILE specifies the change log file name; see `find-change-log'.
See `vc-update-change-log'." See `vc-update-change-log'."
(interactive) (interactive)
(let ((log (find-change-log file))) (let ((log (find-change-log)))
(if log (if log
(let ((default-directory (or (file-name-directory log) (vc-update-change-log
default-directory))) (file-relative-name buffer-file-name
(vc-update-change-log (file-name-directory (expand-file-name log)))))))
(file-relative-name buffer-file-name))))))
(defun vc-finish-logentry (&optional nocomment) (defun vc-finish-logentry (&optional nocomment)
"Complete the operation implied by the current log entry." "Complete the operation implied by the current log entry."
...@@ -1126,7 +1124,7 @@ From a program, any arguments are passed to the `rcs2log' script." ...@@ -1126,7 +1124,7 @@ From a program, any arguments are passed to the `rcs2log' script."
(setq files (cons (file-relative-name file) files))) (setq files (cons (file-relative-name file) files)))
(setq buffers (cdr buffers))) (setq buffers (cdr buffers)))
files)))) files))))
(find-file-other-window "ChangeLog") (find-file-other-window (find-change-log))
(barf-if-buffer-read-only) (barf-if-buffer-read-only)
(vc-buffer-sync) (vc-buffer-sync)
(undo-boundary) (undo-boundary)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment