GNU bug report logs - #931
23.0.60; Bug in bytecomp.el: displaying warnings

Previous Next

Package: emacs;

Reported by: michael_heerdegen <at> web.de

Date: Mon, 8 Sep 2008 19:45:03 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: michael_heerdegen <at> web.de
Cc: 931 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: bug#931: 23.0.60; Bug in bytecomp.el: displaying warnings
Date: Tue, 09 Sep 2008 10:33:37 -0400
> 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?


        Stefan


=== 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-numeric-level warning-minimum-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).
+              (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))))))))
 
 ;;;###autoload
 (defun lwarn (type level message &rest args)





This bug report was last modified 16 years and 313 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.