From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jonathan Yavner Newsgroups: gmane.emacs.devel Subject: re: Bogus byte-compiler warnings Date: Sun, 12 Nov 2006 16:47:59 -0500 Message-ID: <200611121647.59729.jyavner@member.fsf.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1163368105 10910 80.91.229.2 (12 Nov 2006 21:48:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Nov 2006 21:48:25 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 12 22:48:23 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GjNBZ-00052e-GX for ged-emacs-devel@m.gmane.org; Sun, 12 Nov 2006 22:48:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjNBY-0003Js-Sh for ged-emacs-devel@m.gmane.org; Sun, 12 Nov 2006 16:48:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GjNBN-0003Iu-Au for emacs-devel@gnu.org; Sun, 12 Nov 2006 16:48:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GjNBL-0003IX-Ic for emacs-devel@gnu.org; Sun, 12 Nov 2006 16:48:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjNBL-0003IN-Dp for emacs-devel@gnu.org; Sun, 12 Nov 2006 16:48:03 -0500 Original-Received: from [204.127.200.85] (helo=sccrmhc15.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GjNBL-0005lk-F7 for emacs-devel@gnu.org; Sun, 12 Nov 2006 16:48:03 -0500 Original-Received: from [192.168.0.254] (c-68-45-81-14.hsd1.nj.comcast.net[68.45.81.14]) by comcast.net (sccrmhc15) with ESMTP id <2006111221480201500ps9hge>; Sun, 12 Nov 2006 21:48:02 +0000 Original-To: emacs-devel@gnu.org User-Agent: KMail/1.6.2 In-Reply-To: Content-Disposition: inline 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:62136 Archived-At: Reiner Steib writes: > when byte-compiling the following file > > (defun foo-func-1 () > (when (and (boundp 'foo-var) > (fboundp 'foo-1)) > (foo-1))) > > | In end of data: > | rs-byte-compile-warnings.el:11:1:Warning: the function `foo-1' is > | not known to be defined. Bytecomp has a documented hack for use in such cases: (defun foo-func-1 () (when (fboundp 'foo-1) (when (boundp 'foo-var) (foo-1)))) The structure being looked for is "(if (fboundp 'X) BODY)" which suppresses the warning for X within BODY. In your example, the presence of 'and' prevents the hack from matching the code.