From xemacs-m  Thu Feb  6 11:45:52 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id LAA19015
	for <xemacs-beta@xemacs.org>; Thu, 6 Feb 1997 11:45:51 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id JAA16964;
	Thu, 6 Feb 1997 09:56:56 -0800
To: xemacs-beta@xemacs.org
Cc: raman@Adobe.COM, Bill Dubuque <wgd@martigny.ai.mit.edu>
Subject: Re: Hashtable + CL lossage
References: <199702061653.AA268448013@martigny.ai.mit.edu>
X-Url: http://www.miranova.com/%7Esteve/
Mail-Copies-To: never
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Bill Dubuque's message of Thu, 6 Feb 1997 11:53:23 -0500
Mime-Version: 1.0 (generated by tm-edit 7.101)
Content-Type: text/plain; charset=US-ASCII
Date: 06 Feb 1997 09:56:54 -0800
Message-ID: <m2d8udvmvt.fsf@altair.xemacs.org>
Lines: 63
X-Mailer: Gnus v5.4.11/XEmacs 20.0

William Perry writes:
> That patch does get rid of the compiler error, but still doesn't really
> do what it is supposed to.  If I'm not mistaken:

> (require 'cl)
> ;; (defvar table (make-hash-table))

> (defun define-table-entry (key value)
>   (declare (special table))
>   (setf (gethash key table) value))
> (define-table-entry 'a "foo")

> Should not give _any_ warnings about the variable 'table', since it is
> declared special.  But:

> % xemacs -batch -q -l bytecomp -f batch-byte-compile test.el
 ...

Bill Dubuque writes:

> I suspect what is going on is that CL-DO-PROCLAIM (in CL-MACS) is
> pushing onto byte-compile-bound-variables assuming that it is a
> lists of symbols (as in FSF) but in XEmacs it is actually an
> alist of (var . bits). Thus Steven's patch should be removed,

O.K.  Forget the patch to bytecomp.el.

> and instead CL-DO-PROCLAIM should push (CONS VAR 0) for each 
> var it pushes (actually, it probably wants to establish the
> correct global/nonglobal bits etc. but I don't know if CL and
> the bytecompiler are interfaced well enough to determine this).

How about this instead?

Index: cl-macs.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-19.15/lisp/cl/cl-macs.el,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 cl-macs.el
--- cl-macs.el	1996/12/18 03:47:05	1.1.1.2
+++ cl-macs.el	1997/02/06 17:46:23
@@ -1399,7 +1399,8 @@
   (cond ((eq (car-safe spec) 'special)
 	 (if (boundp 'byte-compile-bound-variables)
 	     (setq byte-compile-bound-variables
-		   (append (cdr spec) byte-compile-bound-variables))))
+		   (append (list (append (cdr spec) byte-compile-global-bit))
+			   byte-compile-bound-variables))))
 
 	((eq (car-safe spec) 'inline)
 	 (while (setq spec (cdr spec))


This patch handles the second test case correctly.

> Caveat: above analysis was based on FSF 19.34 CL-MACS and
> XEmacs 19.10 bytecompiler, so may not be totally accurate.
> Is there an easy way to access a single file in the XEmacs dist?

Not at present.  Which files do you wish to look at?
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

