[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 70f994f6d0: * lisp/vc/vc.el (vc-diff-internal): Assume revert-buf
From: |
Juri Linkov |
Subject: |
master 70f994f6d0: * lisp/vc/vc.el (vc-diff-internal): Assume revert-buffer is in current buffer. |
Date: |
Mon, 31 Jan 2022 13:46:36 -0500 (EST) |
branch: master
commit 70f994f6d098c6830cab1fb396d46c42782e7527
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
* lisp/vc/vc.el (vc-diff-internal): Assume revert-buffer is in current
buffer.
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).
---
lisp/vc/vc.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 0096a5fcb3..a6124acadd 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1798,10 +1798,9 @@ Return t if the buffer had changes, nil otherwise."
(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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 70f994f6d0: * lisp/vc/vc.el (vc-diff-internal): Assume revert-buffer is in current buffer.,
Juri Linkov <=