Changed vc-print-log slightly to conform to current version of vc.el

in Emacs source tree.

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 2214]
This commit is contained in:
Jonathan Kamens 2002-10-06 09:34:02 -08:00
parent c3ee00c06d
commit ba127bdbfb

View file

@ -67,33 +67,37 @@
; We need to fix some functions that are broken in vc.el. ; We need to fix some functions that are broken in vc.el.
(defun vc-print-log () (if (fboundp 'vc-default-show-log-entry)
"List the change log of the current buffer in a window." t
(interactive)
(vc-ensure-vc-buffer) (defun vc-default-show-log-entry (backend ver)
(let* ((file buffer-file-name) (if (fboundp 'log-view-goto-rev)
(use-log-view (memq (vc-backend file) '(CVS RCS SCCS)))) (log-view-goto-rev rev)))
(vc-call print-log file)
(set-buffer "*vc*") (defun vc-print-log ()
(pop-to-buffer (current-buffer)) "List the change log of the current buffer in a window."
(if (and use-log-view (fboundp 'log-view-mode)) (log-view-mode)) (interactive)
(vc-exec-after (vc-ensure-vc-buffer)
`(progn (let ((file buffer-file-name))
(goto-char (point-max)) (forward-line -1) (vc-call print-log file)
(while (looking-at "=*\n") (set-buffer "*vc*")
(delete-char (- (match-end 0) (match-beginning 0))) (pop-to-buffer (current-buffer))
(forward-line -1)) (log-view-mode)
(goto-char (point-min)) (vc-exec-after
(if (looking-at "[\b\t\n\v\f\r ]+") `(let ((inhibit-read-only t))
(delete-char (- (match-end 0) (match-beginning 0)))) (goto-char (point-max)) (forward-line -1)
(shrink-window-if-larger-than-buffer) (while (looking-at "=*\n")
;; move point to the log entry for the current version (delete-char (- (match-end 0) (match-beginning 0)))
(if (and use-log-view (fboundp 'log-view-goto-rev)) (forward-line -1))
(log-view-goto-rev ',(vc-workfile-version file)) (goto-char (point-min))
(if (vc-find-backend-function ',(vc-backend file) 'show-log-entry) (if (looking-at "[\b\t\n\v\f\r ]+")
(vc-call-backend ',(vc-backend file) (delete-char (- (match-end 0) (match-beginning 0))))
'show-log-entry (shrink-window-if-larger-than-buffer)
',(vc-workfile-version file)))))))) ;; move point to the log entry for the current version
(vc-call-backend ',(vc-backend file)
'show-log-entry
',(vc-workfile-version file))
(set-buffer-modified-p nil))))))
(defun vc-register (&optional set-version comment) (defun vc-register (&optional set-version comment)
"Register the current file into a version control system. "Register the current file into a version control system.