From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: Problems setting byte-compile-warnings to t Date: Fri, 26 Oct 2007 23:36:25 -0400 Message-ID: References: <9p8x5qiwik.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193456200 3459 80.91.229.12 (27 Oct 2007 03:36:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2007 03:36:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 27 05:36:41 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IlcTY-0006u1-1O for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2007 05:36:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlcTP-0005Rs-DC for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2007 23:36:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlcTM-0005Qt-78 for emacs-devel@gnu.org; Fri, 26 Oct 2007 23:36:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlcTK-0005Q4-Mg for emacs-devel@gnu.org; Fri, 26 Oct 2007 23:36:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlcTK-0005Pt-Jf for emacs-devel@gnu.org; Fri, 26 Oct 2007 23:36:26 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlcTK-0000Fa-CQ for emacs-devel@gnu.org; Fri, 26 Oct 2007 23:36:26 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IlcTJ-0003Vu-O3; Fri, 26 Oct 2007 23:36:25 -0400 X-Spook: enforcers dictionary smuggle Mafia Chobetsu BROMURE data X-Ran: Q^kiC,\XfXL3.3/^Igo(l7sTttRqo%@^"~x%;0+ipAg%9WmC^`I>!s2,?F_^URM39cWGPc X-Hue: black X-Attribution: GM In-Reply-To: (Richard Stallman's message of "Fri, 26 Oct 2007 22:28:53 -0400") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81824 Archived-At: Richard Stallman wrote: > It is true that it changes the current buffer, and that is ugly. > Perhaps we should make it use with-current-buffer. > > But as soon as it returns, you get to > > (with-current-buffer inbuffer > ...) > > followed by > > (and filename (byte-compile-fix-header filename inbuffer outbuffer)))) > > and that function does with-current-buffer too. > > So where is the code that is affected by the change in the current > buffer made by byte-compile-insert-header? I don't think there is any code that is affected by the buffer change per se, and I don't think with-current-buffer will help. The problem seems to be that in inbuffer, byte-compile-warnings has a buffer-local value (`t') that shadows the value setup by byte-compile-close-variables. And all the byte-compiling functions use inbuffer as the current buffer. So the simplest fix would seem to adjust the buffer-local value in inbuffer in the same way that byte-compile-close-variables does.