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:
Tom Willemse 2017-06-07 00:12:36 -07:00
parent 600e9e2f71
commit 5596f66072

View file

@ -507,7 +507,10 @@ files under the default directory otherwise."
(defun vc-p4-diff (file-or-files &optional rev1 rev2 buff)
"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))
(inhibit-read-only t))
(cond