Support the case when reverting is in the buffer with a name other than
the default name "*vc-diff*". Then don't try to switch to the buffer
"*vc-diff*" with an assumption that revert-buffer is always performed
in the current buffer (bug#28852).
(coding-system-for-read
(if files (vc-coding-system-for-diff (car files)) 'undecided))
(orig-diff-buffer-clone
- (if (and (get-buffer buffer) revert-buffer-in-progress-p)
- (with-current-buffer buffer
- (clone-buffer
- (generate-new-buffer-name " *vc-diff-clone*") nil)))))
+ (if revert-buffer-in-progress-p
+ (clone-buffer
+ (generate-new-buffer-name " *vc-diff-clone*") nil))))
;; On MS-Windows and MS-DOS, Diff is likely to produce DOS-style
;; EOLs, which will look ugly if (car files) happens to have Unix
;; EOLs.