home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / lisp / 2318 < prev    next >
Encoding:
Text File  |  1992-08-27  |  983 b   |  32 lines

  1. Newsgroups: comp.lang.lisp
  2. Path: sparky!uunet!caen!hellgate.utah.edu!hellgate!moore
  3. From: moore@cs.utah.edu (Tim Moore)
  4. Subject: Re: Macro lambda lists: &key and &body
  5. Message-ID: <MOORE.92Aug27135541@defmacro.cs.utah.edu>
  6. In-reply-to: raman@cs.cornell.edu's message of Thu, 27 Aug 1992 19:20:17 GMT
  7. Organization: University of Utah CS Dept
  8. References: <1992Aug27.192017.18279@cs.cornell.edu>
  9. Date: 27 Aug 92 13:55:41
  10. Lines: 20
  11.  
  12. In article <1992Aug27.192017.18279@cs.cornell.edu> raman@cs.cornell.edu (T. V. Raman) writes:
  13.    Hi!
  14.  
  15.    I need to supply a keyword argument or at least an optional argument
  16.    with a default value to a macro.
  17.  
  18.    Lisp does not permit
  19.    (defmacro (&key (..) &body body)
  20.  
  21.    What is the correct way of writing this?
  22.  
  23. (defmacro foo ((&key ...) &body body) ...)
  24.  
  25.    Thanks,
  26.    --Raman
  27.  
  28. --
  29. Tim Moore                    moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore
  30. "Wind in my hair - Shifting and drifting - Mechanical music - Adrenaline surge"
  31.     - Rush
  32.