From xemacs-m  Thu Feb  6 02:53:23 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 CAA14560
	for <xemacs-beta@xemacs.org>; Thu, 6 Feb 1997 02:53:22 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id BAA13915;
	Thu, 6 Feb 1997 01:04:27 -0800
To: xemacs-beta@xemacs.org
Cc: raman@Adobe.COM
Subject: Re: Hashtable + CL lossage
References: <199702010821.AAA00422@wmperry.in.aventail.com>
X-Url: http://www.miranova.com/%7Esteve/
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: "William M. Perry"'s message of Sat, 1 Feb 1997 00:21:24 -0800
Mime-Version: 1.0 (generated by tm-edit 7.101)
Content-Type: text/plain; charset=US-ASCII
Date: 06 Feb 1997 01:04:26 -0800
Message-ID: <m2g1za8fvp.fsf@altair.xemacs.org>
Lines: 85
X-Mailer: Gnus v5.4.11/XEmacs 20.0

William M Perry writes:

> From: "T. V. Raman" <raman@Adobe.COM>

> At this point I'd say it's a xemacs bug.

Yup.

 ...

> and here is hash.el

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

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


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.

Index: bytecomp.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/bytecomp/bytecomp.el,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 bytecomp.el
--- bytecomp.el	1996/12/18 22:42:34	1.1.1.1
+++ bytecomp.el	1997/02/06 08:59:01
@@ -3,7 +3,7 @@
 ;;; Copyright (C) 1985-1987, 1991-1994 Free Software Foundation, Inc.
 ;;; Copyright (C) 1996 Ben Wing.
 
-;; Author: Jamie Zawinski <jwz@lucid.com>
+;; Author: Jamie Zawinski <jwz@netscape.com>
 ;;	Hallvard Furuseth <hbf@ulrik.uio.no>
 ;; Keywords: internal
 
@@ -1223,21 +1223,24 @@
 		;; terminating.  (Think nested lets.)
 		(not (eq (car rest) 'new-scope)))
       (setq cell (car rest))
-      (if (and (= 0 (logand byte-compile-referenced-bit (cdr cell)))
-	       ;; Don't warn about declared-but-unused arguments, for two
-	       ;; reasons: first, the arglist structure might be imposed by
-	       ;; external forces, and we don't have (declare (ignore x)) yet;
-	       ;; and second, inline expansion produces forms like
-	       ;;   ((lambda (arg) (byte-code "..." [arg])) x)
-	       ;; which we can't (ok, well, don't) recognise as containing a
-	       ;; reference to arg, so every inline expansion would generate
-	       ;; a warning.  (If we had `ignore' then inline expansion could
-	       ;; emit an ignore declaration.)
-	       (= 0 (logand byte-compile-arglist-bit (cdr cell)))
-	       ;; Don't warn about defvars because this is a legitimate special
-	       ;; binding.
-	       (not (byte-compile-defvar-p (car cell))))
-	  (setq unreferenced (cons (car cell) unreferenced)))
+      (when (listp cell)
+	(if (and (= 0 (logand byte-compile-referenced-bit (cdr cell)))
+		 ;; Don't warn about declared-but-unused arguments,
+		 ;; for two reasons: first, the arglist structure
+		 ;; might be imposed by external forces, and we don't
+		 ;; have (declare (ignore x)) yet; and second, inline
+		 ;; expansion produces forms like
+		 ;;   ((lambda (arg) (byte-code "..." [arg])) x)
+		 ;; which we can't (ok, well, don't) recognise as
+		 ;; containing a reference to arg, so every inline
+		 ;; expansion would generate a warning.  (If we had
+		 ;; `ignore' then inline expansion could emit an
+		 ;; ignore declaration.)
+		 (= 0 (logand byte-compile-arglist-bit (cdr cell)))
+		 ;; Don't warn about defvars because this is a
+		 ;; legitimate special binding.
+		 (not (byte-compile-defvar-p (car cell))))
+	    (setq unreferenced (cons (car cell) unreferenced))))
       (setq rest (cdr rest)))
     (setq unreferenced (nreverse unreferenced))
     (while unreferenced

-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

