[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems setting byte-compile-warnings to t

From: Glenn Morris
Subject: Re: Problems setting byte-compile-warnings to t
Date: Fri, 26 Oct 2007 23:36:25 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]