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:
parent
c3ee00c06d
commit
ba127bdbfb
1 changed files with 31 additions and 27 deletions
22
vc-p4.el
22
vc-p4.el
|
@ -67,18 +67,24 @@
|
||||||
|
|
||||||
; 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)
|
||||||
|
t
|
||||||
|
|
||||||
|
(defun vc-default-show-log-entry (backend ver)
|
||||||
|
(if (fboundp 'log-view-goto-rev)
|
||||||
|
(log-view-goto-rev rev)))
|
||||||
|
|
||||||
|
(defun vc-print-log ()
|
||||||
"List the change log of the current buffer in a window."
|
"List the change log of the current buffer in a window."
|
||||||
(interactive)
|
(interactive)
|
||||||
(vc-ensure-vc-buffer)
|
(vc-ensure-vc-buffer)
|
||||||
(let* ((file buffer-file-name)
|
(let ((file buffer-file-name))
|
||||||
(use-log-view (memq (vc-backend file) '(CVS RCS SCCS))))
|
|
||||||
(vc-call print-log file)
|
(vc-call print-log file)
|
||||||
(set-buffer "*vc*")
|
(set-buffer "*vc*")
|
||||||
(pop-to-buffer (current-buffer))
|
(pop-to-buffer (current-buffer))
|
||||||
(if (and use-log-view (fboundp 'log-view-mode)) (log-view-mode))
|
(log-view-mode)
|
||||||
(vc-exec-after
|
(vc-exec-after
|
||||||
`(progn
|
`(let ((inhibit-read-only t))
|
||||||
(goto-char (point-max)) (forward-line -1)
|
(goto-char (point-max)) (forward-line -1)
|
||||||
(while (looking-at "=*\n")
|
(while (looking-at "=*\n")
|
||||||
(delete-char (- (match-end 0) (match-beginning 0)))
|
(delete-char (- (match-end 0) (match-beginning 0)))
|
||||||
|
@ -88,12 +94,10 @@
|
||||||
(delete-char (- (match-end 0) (match-beginning 0))))
|
(delete-char (- (match-end 0) (match-beginning 0))))
|
||||||
(shrink-window-if-larger-than-buffer)
|
(shrink-window-if-larger-than-buffer)
|
||||||
;; move point to the log entry for the current version
|
;; move point to the log entry for the current version
|
||||||
(if (and use-log-view (fboundp 'log-view-goto-rev))
|
|
||||||
(log-view-goto-rev ',(vc-workfile-version file))
|
|
||||||
(if (vc-find-backend-function ',(vc-backend file) 'show-log-entry)
|
|
||||||
(vc-call-backend ',(vc-backend file)
|
(vc-call-backend ',(vc-backend file)
|
||||||
'show-log-entry
|
'show-log-entry
|
||||||
',(vc-workfile-version file))))))))
|
',(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.
|
||||||
|
|
Loading…
Reference in a new issue