From xemacs-m  Thu Feb  6 09:26:34 1997
Received: from newman (root@newman.aventail.com [38.225.141.10])
	by xemacs.org (8.8.5/8.8.5) with SMTP id JAA17900
	for <xemacs-beta@xemacs.org>; Thu, 6 Feb 1997 09:26:31 -0600 (CST)
Received: from kramer.in.aventail.com.aventail.com (wmperry@kramer [192.168.1.12]) by newman (8.6.12/8.6.9) with SMTP id HAA22475; Thu, 6 Feb 1997 07:24:24 -0800
Date: Thu, 6 Feb 1997 07:24:24 -0800
Message-Id: <199702061524.HAA22475@newman>
From: "William M. Perry" <wmperry@aventail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Steven L Baur <steve@miranova.com>
Cc: xemacs-beta@xemacs.org, raman@Adobe.COM
Subject: Re: Hashtable + CL lossage
In-Reply-To: <m2g1za8fvp.fsf@altair.xemacs.org>
References: <199702010821.AAA00422@wmperry.in.aventail.com>
	<m2g1za8fvp.fsf@altair.xemacs.org>
Errors-to: wmperry@aventail.com
Reply-to: wmperry@aventail.com
X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7</SYF`{vYQ(&RI1&EiH[FvT;J}@f!4kfz
 x_!Y#=y{Uuj9GvUi=cPuajQ(Z42R[wE@{G,sn$qGr5g/wnb*"*ktI+,CD}1Z'wxrM2ag-r0p5I6\nA
 [WJopW_J.WY;

Steven L. Baur writes:
>William M Perry writes:
>
>> From: "T. V. Raman" <raman@Adobe.COM>
>
>> At this point I'd say it's a xemacs bug.
>
>Yup.
>
>The bytecompiler code that checks variables declared with the cl declare
>macro is broken.  This patch is against 20.0, but will apply to 19.15 and
>19.14.

  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
Loading bytecomp...
Compiling /usr/people/wmperry/test.el...
Loading cl-macs...
Loading byte-optimize...
Loading cl-seq...
While compiling define-table-entry in file /usr/people/wmperry/test.el:
  ** reference to free variable table
Wrote /usr/people/wmperry/test.elc
Done

  I have no clue about the bytecompiler other than it screams loudly about
this, when Emacs 19.34's is nice and quiet. :)

-Bill P.

