Subject: bug#52281: 28.0.90; batch-byte-compile breaking up warnings in batch mode

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 04 Dec 2021 20:59:13 +0100

Philipp Stephani <[email-masked]> writes:

> This is inconsistent, and causes parsers (such as Emacs's compilation
> mode) to incorrectly parse these messages.  I think messages in batch
> mode should never be broken up.

The following should fix the issue:

diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 36b275e2d3..1d061364a0 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -307,7 +307,9 @@ display-warning
                                'type 'warning-suppress-log-warning
                                'warning-type type))
               (funcall newline)
-	      (when (and warning-fill-prefix (not (string-search "\n" message)))
+	      (when (and warning-fill-prefix
+                         (not (string-search "\n" message))
+                         (not noninteractive))
 		(let ((fill-prefix warning-fill-prefix)
 		      (fill-column warning-fill-column))
 		  (fill-region start (point))))

Does anybody have an opinion here? 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no