>From d3a57c63deba7aafad821418902c47dfb4fc0ccf Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Wed, 18 Jul 2018 19:32:11 +1200 Subject: [PATCH] * lisp/vc/diff.el (diff-buffer-with-file): Support indirect buffers --- lisp/vc/diff.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index b850350..ac94586 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -226,8 +226,9 @@ diff-buffer-with-file "View the differences between BUFFER and its associated file. This requires the external program `diff' to be in your `exec-path'." (interactive "bBuffer: ") - (with-current-buffer (get-buffer (or buffer (current-buffer))) - (diff buffer-file-name (current-buffer) nil 'noasync))) + (let ((buf (get-buffer (or buffer (current-buffer))))) + (with-current-buffer (or (buffer-base-buffer buf) buf) + (diff buffer-file-name (current-buffer) nil 'noasync)))) (provide 'diff) -- 2.8.3