From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: gdb-ui.el assumes images support Date: Tue, 09 Nov 2004 10:55:32 -0700 Message-ID: References: <01c4c422$Blat.v2.2.2$ae5429e0@zahav.net.il> <16781.27378.713504.174297@farnswood.snap.net.nz> <01c4c485$Blat.v2.2.2$1ce23de0@zahav.net.il> <01c4c517$Blat.v2.2.2$053e38a0@zahav.net.il> <16783.55635.926054.394692@farnswood.snap.net.nz> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1100022977 23256 80.91.229.6 (9 Nov 2004 17:56:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Nov 2004 17:56:17 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 09 18:56:12 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CRaE0-0004GX-00 for ; Tue, 09 Nov 2004 18:56:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRaMP-0005c2-J4 for ged-emacs-devel@m.gmane.org; Tue, 09 Nov 2004 13:04:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRaMH-0005bm-Km for emacs-devel@gnu.org; Tue, 09 Nov 2004 13:04:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRaMG-0005bM-QT for emacs-devel@gnu.org; Tue, 09 Nov 2004 13:04:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRaMG-0005bG-Jj for emacs-devel@gnu.org; Tue, 09 Nov 2004 13:04:44 -0500 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CRaDU-0007ag-Gb for emacs-devel@gnu.org; Tue, 09 Nov 2004 12:55:40 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CRaDT-0003YG-00 for ; Tue, 09 Nov 2004 18:55:39 +0100 Original-Received: from 170.207.1.200 ([170.207.1.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Nov 2004 18:55:39 +0100 Original-Received: from ihs_4664 by 170.207.1.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Nov 2004 18:55:39 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 51 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 170.207.1.200 User-Agent: Mozilla Thunderbird 0.8 (X11/20040916) X-Accept-Language: en-us, en In-Reply-To: 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: main.gmane.org gmane.emacs.devel:29662 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29662 Kim F. Storm wrote: > Kevin Rodgers writes: > > Kim F. Storm wrote: > > > How else would you avoid such warnings? > > > > With (require 'feature) at the top level, since it is needed at runtime. > > file a.el has this: > (require 'b) > ;;;#autoload > (defun a-fun1 () > (b-fun)) > (defun a-fun2 () > t) > (provide 'a) > > file b.el has this: > (defun b-fun () > (a-fun2)) > (provide 'b) > > Assuming that b is never used directly, this works fine. > > > Now, when you byte-compile b.el, you get warning for a-fun2. > > So according to your advise, we add > (require 'a) > to b.el, and compile again with this result: > > b.el:1:2:Error: Recursive `require' for feature `a' I think that is why Common Lisp recommends putting (provide 'feature) first rather than last; but (provide 'feature) is last in Emacs Lisp files to support the unload-feature command. > What if > > (defun a-fun2) > > would be a dummy defun for the byte-compiler just like > > (defvar a-var) > > ? That seems natural to me. -- Kevin Rodgers