From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dave Love Newsgroups: gmane.emacs.devel Subject: Re: bytecomp warning for CL functions Date: 01 Jul 2002 19:11:19 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200206261410.g5QEASU11961@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1025547165 27211 127.0.0.1 (1 Jul 2002 18:12:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 1 Jul 2002 18:12:45 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17P5fJ-00074m-00 for ; Mon, 01 Jul 2002 20:12:45 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17P5jx-0001xu-00 for ; Mon, 01 Jul 2002 20:17:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17P5eh-000895-00; Mon, 01 Jul 2002 14:12:07 -0400 Original-Received: from albion.dl.ac.uk ([148.79.80.39]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17P5dx-00087Q-00; Mon, 01 Jul 2002 14:11:21 -0400 Original-Received: from fx by albion.dl.ac.uk with local (Exim 3.35 #1 (Debian)) id 17P5dv-0006wB-00; Mon, 01 Jul 2002 19:11:19 +0100 Original-To: "Stefan Monnier" Original-Lines: 33 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5293 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5293 "Stefan Monnier" writes: > Could someone explain to me what this really does ? It detects all (I hope) use of cl functions in the compiled code to help me debug it. > I had installed a hack that tries to notice when you call a function > that will not be available at runtime (because the library > was loaded via (eval-when-compile (require 'LIB)) as is done for CL). The cases of interest are when that isn't done, or when you're in a session that's already loaded it for some reason (e.g. Debian with various Emacs packages installed) or when there's an explicit autoload defined for a cl function, &c. (Real examples.) > I notice for example that it warns about code that uses `values' but > since the CVS has replaced the defvalias with a defsubst for `values', > a call to `values' gets replaced during byte-compilation so that > it works just fine even without using CL at runtime. The warning would be useful regardless, if you're trying to make stuff run in 21.2. In principle it would also list things problematic in Emacs 20, but I don't currently need that. > What I'm trying to figue out is if there is a way to get the benefits > of Dave's code without having to hard-code any particular list > of functions. Sure. You'd have to check the indirections of aliases to see if they contained anything defined in the cl files. Obviously you could generalize it to deal with packages other than cl, but I can't think of any for which that would be useful.