Newsgroups: comp.lang.lisp.x
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!newsxfer.itd.umich.edu!gatech!swrinde!cs.utexas.edu!news.sprintlink.net!noc.netcom.net!netcom.com!mayer
From: "Niels P. Mayer" <mayer@netcom.com>
Subject: (no subject)
Content-Type: text/plain; charset=us-ascii
Message-ID: <mayerD88z8A.4o1@netcom.com>
Sender: mayer@netcom12.netcom.com
Content-Transfer-Encoding: 7bit
Organization: None
Mime-Version: 1.0
Date: Mon, 8 May 1995 06:55:22 GMT
X-Mailer: Mozilla 1.1S (X11; I; IRIX 5.3 IP22)
X-Url: news:comp.lang.lisp.x
Lines: 41

In previous versions of XLISP (e.g. 2.1, and 2.1c,d, WINTERP 2.03, etc)
you used to be able to have &key arguments like this (taken from
Tim Mikkelsen's XLISP Reference Manual, available via WWW at URL 
http://www.eit.com/software/winterp/doc/XlispRef.doc):

	(defun fi				; define function FI
	  (a &key ((:mykey b) 9 b-passed) )	;   with some optional args
	  (print a) (print b)			;
	  (if b-passed (print "b was passed")	;
	               (print "b not passed")))	;
	(fi)					; error: too few arguments
	(fi 1)					; prints 1 9 "b not passed"
	(fi 1 2)				; prints 1 9 "b not passed"
	(fi 1 :b 2)				; prints 1 9 "b not passed"
	(fi 1 :mykey 2)				; prints 1 2 "b was passed"

In XLISP 2.1g (ftp://oak.oakland.edu/SimTel/msdos/xlisp/xl21gsrc.zip), 
any '&key ((:foo foo) ...)' form seems to give an error:
	error: bad formal argument list

However, a simpler form of &key does work:

(defun fee				; define function FEE
  (a &key (b 9 b-passed)		;   with some optional args
     &ALLOW-OTHER-KEYS)
  (print a) (print b)			;
  (if b-passed (print "b was passed")	;
    (print "b not passed")))

Is this a bug, in 2.1g, or is this a change for CL compatibility?

PS: Clearly, http://www.eit.com/software/winterp/doc/XlispRef.doc needs
to be updated to XLISP 2.1g. For example, you need to add &ALLOW-OTHER-KEYS
in order to get some of the examples to work in XLISP 2.1g.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
= Niels Mayer ..... mayer@eit.com .... http://www.eit.com/people/mayer.html =
=  Multimedia Engineering Collaboration Environment (MM authoring for WWW)  =
=  Enterprise Integration Technologies, 800 El Camino Real, Menlo Park, CA  =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

