home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / lisp / 3402 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.2 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!udel!bogus.sura.net!howland.reston.ans.net!spool.mu.edu!uwm.edu!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!scsing.switch.ch!sicsun!disuns2!disuns2.epfl.ch!simon
  2. From: simon@lia.di.epfl.ch (Simon Leinen)
  3. Newsgroups: comp.lang.lisp
  4. Subject: Re: Need help with macro writing
  5. Message-ID: <SIMON.93Jan27104642@liasg2.epfl.ch>
  6. Date: 27 Jan 93 09:46:42 GMT
  7. References: <1993Jan26.215013.12107@news.unige.ch>
  8. Sender: news@disuns2.epfl.ch
  9. Organization: Ecole Polytechnique Federale de Lausanne
  10. Lines: 17
  11. Nntp-Posting-Host: liasg2.epfl.ch
  12. In-reply-to: schneide@divsun.unige.ch's message of 26 Jan 93 21:50:13 GMT
  13. X-Md4-Signature: ba52b657dc891fbbc6bac791e8bd3d93
  14.  
  15. In article <1993Jan26.215013.12107@news.unige.ch>
  16. schneide@divsun.unige.ch (SCHNEIDER daniel) writes:
  17.  
  18.    I am a bit stuck with macro writing. I'd like to translate this:
  19.  
  20.    (with-output-as-presentation1 (:stream t :type tt :object ttt) (print object) (bla bla))
  21.  
  22.    into this:
  23.  
  24.    (WITH-OUTPUT-AS-PRESENTATION (T TT TTT) (PRINT OBJECT) (BLA BLA))
  25.  
  26. You can use &KEY arguments in sublists of the argument lists for macros:
  27.  
  28. (defmacro with-output-as-presentation1 ((&key stream type object) &body body)
  29.   `(with-output-as-presentation (,stream ,type ,object) ,@body))
  30. -- 
  31. Simon.
  32.