unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Problems setting byte-compile-warnings to t
Date: Fri, 26 Oct 2007 23:36:25 -0400	[thread overview]
Message-ID: <vgprz1fcue.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <E1IlbPx-0008VA-BD@fencepost.gnu.org> (Richard Stallman's message of "Fri, 26 Oct 2007 22:28:53 -0400")

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	other threads:[~2007-10-27  3:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 22:42 Problems setting byte-compile-warnings to t Glenn Morris
2007-10-25 23:50 ` Glenn Morris
2007-10-27  2:28   ` Richard Stallman
2007-10-27  3:36     ` Glenn Morris [this message]
2007-10-28 13:51       ` Richard Stallman
2007-10-28 23:58         ` Glenn Morris
2007-10-29  9:22           ` Richard Stallman
2007-10-29 18:39           ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vgprz1fcue.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).