[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d727d3d: Check that the buffer in diff-buffer-with-file is visiti
From: |
Lars Ingebrigtsen |
Subject: |
master d727d3d: Check that the buffer in diff-buffer-with-file is visiting a file |
Date: |
Tue, 15 Sep 2020 08:56:23 -0400 (EDT) |
branch: master
commit d727d3dad649d1569a6babaf398439d101e282d4
Author: Daniel MartÃn <mardani29@yahoo.es>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Check that the buffer in diff-buffer-with-file is visiting a file
* lisp/vc/diff.el (diff-buffer-with-file): Signal a specific error
when the buffer passed to diff-buffer-with-file is not visiting a
file (bug#43401).
---
lisp/vc/diff.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el
index 4698880..b7f17bf 100644
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -258,6 +258,8 @@ This requires the external program `diff' to be in your
`exec-path'."
(interactive "bBuffer: ")
(let ((buf (get-buffer (or buffer (current-buffer)))))
(with-current-buffer (or (buffer-base-buffer buf) buf)
+ (unless buffer-file-name
+ (error "Buffer is not visiting a file"))
(diff buffer-file-name (current-buffer) nil 'noasync))))
;;;###autoload
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d727d3d: Check that the buffer in diff-buffer-with-file is visiting a file,
Lars Ingebrigtsen <=