unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36564: 27.0.50; Wrong number of errors in compilation mode-line
@ 2019-07-09 20:25 Juri Linkov
  2019-07-10 22:34 ` Juri Linkov
  0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2019-07-09 20:25 UTC (permalink / raw)
  To: 36564

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

Often compilation-mode displays wrong number of errors
in the mode-line even when compilation is finished.

compilation-mode is based on font-lock, so when the
*compilation* buffer is not displayed during compilation,
some parts of this buffer that contain error messages
are not fontified, and thus these errors are not counted.

This patch ensures the correct number of errors
is displayed on the mode-line:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: compilation-handle-exit-font-lock-ensure.patch --]
[-- Type: text/x-diff, Size: 592 bytes --]

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 1a0d9bdbb7..a28e5f6068 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2179,6 +2182,8 @@ compilation-handle-exit
     ;; Prevent that message from being recognized as a compilation error.
     (add-text-properties omax (point)
 			 (append '(compilation-handle-exit t) nil))
+    ;; Update the number of errors in compilation-mode-line-errors
+    (font-lock-ensure)
     (setq mode-line-process
           (list
            (let ((out-string (format ":%s [%s]" process-status (cdr status)))

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-07-15 12:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-09 20:25 bug#36564: 27.0.50; Wrong number of errors in compilation mode-line Juri Linkov
2019-07-10 22:34 ` Juri Linkov
2019-07-11 21:47   ` Juri Linkov
2019-07-11 22:02   ` Juri Linkov
2019-07-11 22:32   ` Stefan Monnier
2019-07-12 18:57     ` Juri Linkov
2019-07-12 20:09       ` Stefan Monnier
2019-07-13 22:04         ` Juri Linkov
2019-07-15 12:44           ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).