[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1365348: * lisp/progmodes/compile.el: Fix bug#36803
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master 1365348: * lisp/progmodes/compile.el: Fix bug#36803. |
Date: |
Sat, 27 Jul 2019 09:57:24 -0400 (EDT) |
branch: master
commit 13653483b7af500ebbbc503a0b54d0e25b53aac3
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/progmodes/compile.el: Fix bug#36803.
Make sure all mode-lines are updated when compilation-in-progress
is changed since it's visible globally.
(compilation--update-in-progress-mode-line): New function.
(compilation-start, compilation-sentinel): Use it.
---
lisp/progmodes/compile.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index a7575b5..39b6134 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1613,6 +1613,11 @@ If nil, ask to kill it."
:type 'boolean
:version "24.3")
+(defun compilation--update-in-progress-mode-line ()
+ ;; `compilation-in-progress' affects the mode-line of all
+ ;; buffers when it changes from nil to non-nil or vice-versa.
+ (unless compilation-in-progress (force-mode-line-update t)))
+
;;;###autoload
(defun compilation-start (command &optional mode name-function
highlight-regexp)
"Run compilation command COMMAND (low level interface).
@@ -1806,8 +1811,8 @@ Returns the compilation buffer created."
;; The process may have exited already.
(error nil)))
(run-hook-with-args 'compilation-start-hook proc)
- (setq compilation-in-progress
- (cons proc compilation-in-progress)))
+ (compilation--update-in-progress-mode-line)
+ (push proc compilation-in-progress))
;; No asynchronous processes available.
(message "Executing `%s'..." command)
;; Fake mode line display as if `start-process' were run.
@@ -2240,7 +2245,8 @@ commands of Compilation major mode are available. See
;; process is dead, we can delete it now. Otherwise it
;; will stay around until M-x list-processes.
(delete-process proc)))
- (setq compilation-in-progress (delq proc compilation-in-progress)))))
+ (setq compilation-in-progress (delq proc compilation-in-progress))
+ (compilation--update-in-progress-mode-line))))
(defun compilation-filter (proc string)
"Process filter for compilation buffers.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 1365348: * lisp/progmodes/compile.el: Fix bug#36803.,
Stefan Monnier <=