unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Problems setting byte-compile-warnings to t
Date: Thu, 25 Oct 2007 19:50:59 -0400	[thread overview]
Message-ID: <9p8x5qiwik.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <alejfihl4d.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 25 Oct 2007 18:42:26 -0400")

Glenn Morris wrote:

> Perhaps one of the `(memq foo byte-compile-warnings)' in bytecomp.el
> is being run outside byte-compile-close-variables?

Looking at it some more, the value of byte-compile-warnings set by
byte-compile-close-variables gets clobbered when
byte-compile-insert-header is called. It changes the buffer to
" *Compiler Input", where the buffer local value shadows the value in
the let-binding.

A possible fix might be to alter the value in the " *Compiler Input" buffer:

***************
*** 1682,1687 ****
--- 1687,1697 ----
    ;; Arg of t means don't alter enable-local-variables.
          (normal-mode t)
          (setq filename buffer-file-name))
+       ;; Respect any file local variables.
+       (set (make-local-variable 'byte-compile-warnings)
+            (if (eq byte-compile-warnings t)
+                byte-compile-warning-types
+              byte-compile-warnings))
        ;; Set the default directory, in case an eval-when-compile uses it.
        (setq default-directory (file-name-directory filename)))
      ;; Check if the file's local variables explicitly specify not to

  reply	other threads:[~2007-10-25 23:50 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 [this message]
2007-10-27  2:28   ` Richard Stallman
2007-10-27  3:36     ` Glenn Morris
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=9p8x5qiwik.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@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).