> If pop-up-windows is nil, and warnings have to be displayed,
> `byte-compile-report-error' is called, and after that,
> (current-buffer) will be the Compile Log buffer, and the current
> buffer is not restored for further iterations of the while loop.
Does the patch below fix the problem?
Maybe the fix should even be pushed further down into display-buffer?
=== modified file 'lisp/emacs-lisp/warnings.el'
--- lisp/emacs-lisp/warnings.el 2008-05-06 14:18:59 +0000
+++ lisp/emacs-lisp/warnings.el 2008-09-09 14:32:38 +0000
@@ -286,11 +286,15 @@
(or (< (warning-numeric-level level)
(warning-suppress-p type warning-suppress-types)
+ ;; `display-buffer' usually preserves current-buffer, except
+ ;; when it ends up doing switch-to-buffer (e.g. pop-up-windows
+ ;; is nil).
(let ((window (display-buffer buffer)))
(when (and (markerp warning-series)
(eq (marker-buffer warning-series) buffer))
(set-window-start window warning-series))
- (sit-for 0)))))))
+ (sit-for 0))))))))
(defun lwarn (type level message &rest args)