From xemacs-m  Sun Jan 26 18:46:29 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id SAA13264 for <xemacs-beta@xemacs.org>; Sun, 26 Jan 1997 18:46:28 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id QAA06070;
	Sun, 26 Jan 1997 16:57:33 -0800
To: xemacs-beta@xemacs.org
Cc: bug-gnu-emacs@prep.ai.mit.edu
Subject: Re: Oh no, another autoload bug
References: <9701262344.AA05340@thymus.synaptics.com>
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: Dave Gillespie's message of Sun, 26 Jan 97 15:44:00 -0800
Mime-Version: 1.0 (generated by tm-edit 7.100)
Content-Type: text/plain; charset=US-ASCII
Date: 26 Jan 1997 16:57:31 -0800
Message-ID: <m27ml0hr44.fsf@altair.xemacs.org>
Lines: 55
X-Mailer: Gnus v5.4.3/XEmacs 20.0

Dave Gillespie writes:

> Steven L Baur writes in xemacs-beta:
>> fred.el:
>> (setq fred (concatenate 'vector '(1 2 3 4)))
>> !! error (("file \"cl-extra\" didn't define \"concatenate\""))

> This same bug occurs in GNU Emacs 19.33.

And in Emacs 19.34, but it doesn't strike concatenate.

> I don't have an up-to-date version of XEmacs installed, but here is
> the reason for the bug in 19.33.

> In byte-opt.el, the following function attempts to do in Lisp what
> do_autoload() does in C:

Thanks for the clue.

Repeating the initialization at the top of the function makes the
error go away.

Here's a patch for XEmacs and Emacs 19.34 (byte-opt.el).

Index: byte-optimize.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/bytecomp/byte-optimize.el,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 byte-optimize.el
*** byte-optimize.el	1996/12/18 22:42:34	1.1.1.1
--- byte-optimize.el	1997/01/27 00:45:23
***************
*** 273,279 ****
  	  form)
        ;; else
        (if (and (consp fn) (eq (car fn) 'autoload))
! 	  (load (nth 1 fn)))
        (if (and (consp fn) (eq (car fn) 'autoload))
  	  (error "file \"%s\" didn't define \"%s\"" (nth 1 fn) name))
        (if (symbolp fn)
--- 273,282 ----
  	  form)
        ;; else
        (if (and (consp fn) (eq (car fn) 'autoload))
! 	  (progn
! 	    (load (nth 1 fn))
! 	    (setq fn (or (cdr (assq name byte-compile-function-environment))
! 			 (and (fboundp name) (symbol-function name))))))
        (if (and (consp fn) (eq (car fn) 'autoload))
  	  (error "file \"%s\" didn't define \"%s\"" (nth 1 fn) name))
        (if (symbolp fn)

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

