From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: era@iki.fi Newsgroups: gmane.emacs.bugs Subject: Re: Bug in emacs Date: 17 Oct 2003 11:52:26 +0300 Organization: People Who Are Not Old Enough For Unix (Honorary Member Emeritus) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87ad80ckvs.fsf@era.iki.fi> References: <004301c38cd9$2260b1a0$0100a8c0@athlon> <3F8AD296.7010803@yahoo.com> <87vfqsl64g.fsf@era.iki.fi> <87he29ejqq.fsf@era.iki.fi> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066380958 2616 80.91.224.253 (17 Oct 2003 08:55:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Oct 2003 08:55:58 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 17 10:55:56 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AAQOq-0004TF-00 for ; Fri, 17 Oct 2003 10:55:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AAQMa-0006uw-8K for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Oct 2003 04:53:36 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AAQMH-0006th-Fx for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2003 04:53:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AAQLk-0006hs-6z for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2003 04:53:15 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AAQLg-0006fm-Rk for bug-gnu-emacs@gnu.org; Fri, 17 Oct 2003 04:52:41 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AAQLU-0005Et-00 for ; Fri, 17 Oct 2003 10:52:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AAQLS-0005El-00 for ; Fri, 17 Oct 2003 10:52:26 +0200 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AAQLS-0000aF-00 for ; Fri, 17 Oct 2003 10:52:26 +0200 Original-Lines: 31 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5991 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5991 On 16 Oct 2003 10:59:30 +0300, era@iki.fi posted to gmane.emacs.bugs: > Oog, I got this backwards. (Thanks to RMS for pointing out my error in > private mail.) The problem is that when a macro is +not+ defined when > code is byte-compiled, the compiler assumes it's a function call; then > when the compiled code is executed, and the macro +is+ defined, you > get an error. And just to elaborate, one semi-important aspect of this is that it is hard to be sure that you are (require)ing everything you should, and that getting a warning when you are compiling code which uses a macro which is not properly required by that code would be a useful aid for developers. A related problem which I imagine could be tackled with the same mechanism is that if you happen to have loaded or required a library which your code uses, but the code does not properly load or require it, you don't get any warning at compilation time currently. It would be useful to get a warning in this case, too. Down the line, you could even have a function which figures out and automatically inserts adequate (require) and (load) forms in your code. (Figuring out whether a library provides something you would like to require is annoying drudgery too.) /* era */ -- The email address era the contact information Just for kicks, imagine at iki dot fi is heavily link on my home page at what it's like to get spam filtered. If you 500 pieces of spam for want to reach me, see instead. each wanted message.