Fix vc-p4-diff for buffer string argument
BUFF may be a string as well as a buffer. In case it is a string it should use that string to create the buffer for the diff.
This commit is contained in:
parent
600e9e2f71
commit
5596f66072
1 changed files with 4 additions and 1 deletions
5
vc-p4.el
5
vc-p4.el
|
@ -507,7 +507,10 @@ files under the default directory otherwise."
|
||||||
|
|
||||||
(defun vc-p4-diff (file-or-files &optional rev1 rev2 buff)
|
(defun vc-p4-diff (file-or-files &optional rev1 rev2 buff)
|
||||||
"Do a Perforce diff."
|
"Do a Perforce diff."
|
||||||
(let* ((buffer (or (bufferp buff) (get-buffer-create "*vc-diff*")))
|
(let* ((buffer (cond
|
||||||
|
((bufferp buff) buff)
|
||||||
|
((stringp buff) (get-buffer-create buff))
|
||||||
|
(t (get-buffer-create "*vc-diff*"))))
|
||||||
(files (if (atom file-or-files) (list file-or-files) file-or-files))
|
(files (if (atom file-or-files) (list file-or-files) file-or-files))
|
||||||
(inhibit-read-only t))
|
(inhibit-read-only t))
|
||||||
(cond
|
(cond
|
||||||
|
|
Loading…
Reference in a new issue