[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: generic-function-pretty-arglist
- To: kempf@sun.com, CommonLoops.PA@Xerox.COM
- Subject: Re: generic-function-pretty-arglist
- From: duff%eraserhead%steinmetz@uunet.UU.NET (David A Duff)
- Date: Mon, 12 Dec 88 15:25:09 EST
- In-reply-to: <6238@vdsvax.steinmetz.ge.com>
- Newsgroups: mail.clos
- Organization: GE Corporate Research and Development, Schenectady, NY
- Redistributed: commonloops.PA
- Reply-to: duff@eraserhead.steinmetz.Ge.Com
[Re: getting an error in a call to generic-function-pretty-arglist]
I have encountered the same problem. I fixed it, but since I hadn't been
getting pcl mail in a while, I didn't bother reporting it -- I figured someone
would have fixed and reported it by now.
Anyway, the problem is in the file methods.lisp in the function
generic-function-pretty-arglist. Here is the patched 8/24 version. I haven't
had a chance to get the new version yet, so I don't know if this change is
compatible. I think it probably is.
To patch an existing pcl: just re-evaluate this new definition. There don't
seem to be any serious side-effects.
(defmethod generic-function-pretty-arglist
((generic-function standard-generic-function))
(let ((methods (generic-function-methods generic-function))
(arglist ()))
(when methods
(multiple-value-bind (required optional rest key allow-other-keys)
(method-pretty-arglist (car methods))
(dolist (m (cdr methods))
(multiple-value-bind (method-key method-allow-other-keys)
(method-pretty-arglist-1 m)
(setq key (union key method-key))
(setq allow-other-keys (or allow-other-keys
method-allow-other-keys))))
(when allow-other-keys
(setq arglist '(&allow-other-keys)))
(when key
(setq arglist (nconc (list '&key) key arglist)))
;; I made a small patch here. This bug was making lucid's debugger
;; ill. d.d. 10/26/88
;(when rest
; (setq arglist (nconc (list '&rest) rest arglist)))
(when rest
(setq arglist (nconc (list '&rest rest) arglist)))
(when optional
(setq arglist (nconc (list '&optional) optional arglist)))
(nconc required arglist)))))
--
Dave Duff GE Research and Development Center
duff@eraserhead.steinmetz.ge.com Schenectady, New York
uunet!steinmetz!eraserhead!duff 518-387-5649