[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d98ee76776: Tweak window handling in vc-pull-and-push
From: |
Lars Ingebrigtsen |
Subject: |
master d98ee76776: Tweak window handling in vc-pull-and-push |
Date: |
Sat, 24 Sep 2022 16:43:42 -0400 (EDT) |
branch: master
commit d98ee767765032acc7f8f14c86dcbbfb67dbcaee
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Tweak window handling in vc-pull-and-push
* lisp/vc/vc-dispatcher.el (vc--inhibit-async-window): Rename
variable.
(vc-do-async-command): Allow inhibiting all window changes.
* lisp/vc/vc-git.el (vc-git-pull-and-push): Don't pop up the
window asynchronously on the "pull" because that gets in the way
of doing other things.
---
lisp/vc/vc-dispatcher.el | 11 +++++------
lisp/vc/vc-git.el | 4 ++--
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 52cf60e992..89bf79622e 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -425,7 +425,7 @@ case, and the process object in the asynchronous case."
command file-or-list flags))
status)))))
-(defvar vc--inhibit-change-window-start nil)
+(defvar vc--inhibit-async-window nil)
(defun vc-do-async-command (buffer root command &rest args)
"Run COMMAND asynchronously with ARGS, displaying the result.
@@ -436,7 +436,7 @@ The process object is returned.
Display the buffer in some window, but don't select it."
(let ((dir default-directory)
(inhibit-read-only t)
- window new-window-start proc)
+ new-window-start proc)
(setq buffer (get-buffer-create buffer))
(if (get-buffer-process buffer)
(error "Another VC action on %s is running" root))
@@ -459,10 +459,9 @@ Display the buffer in some window, but don't select it."
(insert "\"...\n")
args))))
(setq proc (apply #'vc-do-command t 'async command nil args))))
- (setq window (display-buffer buffer))
- (when (and window
- (not vc--inhibit-change-window-start))
- (set-window-start window new-window-start))
+ (unless vc--inhibit-async-window
+ (when-let ((window (display-buffer buffer)))
+ (set-window-start window new-window-start)))
proc))
(defvar compilation-error-regexp-alist)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 22f7750feb..f5ac43f536 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1150,11 +1150,11 @@ for the Git command to run."
(with-current-buffer (process-buffer proc)
(if (and (eq (process-status proc) 'exit)
(zerop (process-exit-status proc)))
- (let ((vc--inhibit-change-window-start t))
+ (let ((vc--inhibit-async-window t))
(vc-git-push nil))
(vc-exec-after
(lambda ()
- (let ((vc--inhibit-change-window-start t))
+ (let ((vc--inhibit-async-window t))
(vc-git-push nil)))
proc))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d98ee76776: Tweak window handling in vc-pull-and-push,
Lars Ingebrigtsen <=