Subject: bug#931: 23.0.60; Bug in bytecomp.el: displaying warnings

From: martin rudalics <[email-masked]>
Date: Wed, 10 Sep 2008 11:23:43 +0200

> +              ;; `display-buffer' usually preserves current-buffer, except
 > +              ;; when it ends up doing switch-to-buffer (e.g. pop-up-windows
 > +              ;; is nil).

FWIW it's set_window_buffer in

   /* We must select BUFFER for running the window-scroll-functions.
      If WINDOW is selected, switch permanently.
      Otherwise, switch but go back to the ambient buffer afterward.  */
   if (EQ (window, selected_window))
     Fset_buffer (buffer);

which is not very clean (and not documented in `set-window-buffer').

 > +              (save-current-buffer
 >  	      (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))))))))

This will cause the *Warnings* buffer to flash shortly here and
immediately get replaced when compilation finished.

martin