From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: incorrect warning when byte compiling? Date: Mon, 25 Jun 2012 18:55:49 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340665219 27815 80.91.229.3 (25 Jun 2012 23:00:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Jun 2012 23:00:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 26 01:00:18 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SjIGT-0001pe-Jx for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Jun 2012 01:00:13 +0200 Original-Received: from localhost ([::1]:41112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjIGT-0000jq-Ki for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Jun 2012 19:00:13 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe18.iad.POSTED!00000000!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) Cancel-Lock: sha1:b5cB1H+p7oYi1cCsKfkvExb4jtY= Original-Lines: 21 Original-X-Complaints-To: abuse@UsenetServer.com Original-NNTP-Posting-Date: Mon, 25 Jun 2012 22:55:49 UTC X-Received-Bytes: 1477 Original-Xref: usenet.stanford.edu gnu.emacs.help:193072 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85467 Archived-At: > Is this a bug/limitation in the Emacs byte compiler? Bug, no, limitation, yes. > It's easy enough to silence this warning (e.g., with (when (fboundp > whitespace-mode) ...)), but I want to know why Emacs thinks this > is a problem. Doing "(eval-when-compile (require 'whitespace nil t))" and then "(when (require 'whitespace nil t)" is very unusual so the byte-compiler does not try to handle this kind of circumstance cleverly. Really, (eval-when-compile (require 'whitespace nil t)) is meant for the case where `whitespace' defines functions or macros which will be called during byte-compilation; it's not meant to silence compiler warnings. Rather than fboundp, you can also use `declare-function', whose purpose is specifically to silence compiler warnings. Stefan