Skip to content

Commit 6135654

Browse files
committed
* lisp/vc/vc-dispatcher.el (vc-do-command): Let-bind inhibit-message to t
in active minibuffer. (Bug#34939)
1 parent 82db17d commit 6135654

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lisp/vc/vc-dispatcher.el

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,19 +324,22 @@ case, and the process object in the asynchronous case."
324324
(apply 'start-file-process command (current-buffer)
325325
command squeezed))))
326326
(when vc-command-messages
327-
(message "Running in background: %s" full-command))
327+
(let ((inhibit-message (eq (selected-window) (active-minibuffer-window))))
328+
(message "Running in background: %s" full-command)))
328329
;; Get rid of the default message insertion, in case we don't
329330
;; set a sentinel explicitly.
330331
(set-process-sentinel proc #'ignore)
331332
(set-process-filter proc 'vc-process-filter)
332333
(setq status proc)
333334
(when vc-command-messages
334335
(vc-run-delayed
335-
(let ((message-truncate-lines t))
336+
(let ((message-truncate-lines t)
337+
(inhibit-message (eq (selected-window) (active-minibuffer-window))))
336338
(message "Done in background: %s" full-command)))))
337339
;; Run synchronously
338340
(when vc-command-messages
339-
(message "Running in foreground: %s" full-command))
341+
(let ((inhibit-message (eq (selected-window) (active-minibuffer-window))))
342+
(message "Running in foreground: %s" full-command)))
340343
(let ((buffer-undo-list t))
341344
(setq status (apply 'process-file command nil t nil squeezed)))
342345
(when (and (not (eq t okstatus))
@@ -350,7 +353,8 @@ case, and the process object in the asynchronous case."
350353
(if (integerp status) (format "status %d" status) status)
351354
full-command))
352355
(when vc-command-messages
353-
(message "Done (status=%d): %s" status full-command))))
356+
(let ((inhibit-message (eq (selected-window) (active-minibuffer-window))))
357+
(message "Done (status=%d): %s" status full-command)))))
354358
(vc-run-delayed
355359
(run-hook-with-args 'vc-post-command-functions
356360
command file-or-list flags))

0 commit comments

Comments
 (0)